summaryrefslogtreecommitdiff
path: root/pango/glyphstring.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2000-12-14 23:23:14 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-12-14 23:23:14 +0000
commit016c4d7047fd3ac2f76667f4ffe3b3a22ad0b902 (patch)
tree740872633a5f6f1ffda8dbf8a01e5249e9ff85de /pango/glyphstring.c
parent1b3ed686bdc299ab5b79eeb8a485f6d84189f4e6 (diff)
downloadpango-016c4d7047fd3ac2f76667f4ffe3b3a22ad0b902.tar.gz
add assertion that shaper != NULL to catch engine problems faster
2000-12-14 Havoc Pennington <hp@redhat.com> * pango/fonts.c (pango_font_find_shaper): add assertion that shaper != NULL to catch engine problems faster * pango/Makefile.am (libpangox_la_SOURCES): modules.[hc] and module-defs.c have to go in libpangox for now since the modules use the X stuff, and static linkage won't let you play games here * examples/Makefile.am (pango_viewer_LDADD): fix order of link * modules/indic/pango-indic-script.h (pango_indic_get_char): make this a macro, so it doesn't collide between modules * modules/*/Makefile.am: Fix to work if the module isn't included * examples/Makefile.am: don't query modules if we didn't build any * modules/indic/gurmukhi.c (MODULE_ENTRY): fix prefix * modules/indic/bengali.c (MODULE_ENTRY): fix prefix * modules/indic/gujarati.c (MODULE_ENTRY): fix prefix * modules/indic/devanagari.c (MODULE_ENTRY): fix prefix * modules/indic/myanmar.c (MODULE_ENTRY): uniquely prefix the functions * modules/Makefile.am (MODULES): handle case where there are no modules to query * configure.in: Fix up include_modules stuff to work with Indic * pango/glyphstring.c (pango_glyph_string_set_size): Just g_error() if the glyph string exceeds maximum integer size, instead of mysteriously crashing later.
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r--pango/glyphstring.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index 48b46b71..ded4a856 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -54,16 +54,16 @@ void
pango_glyph_string_set_size (PangoGlyphString *string, gint new_len)
{
g_return_if_fail (new_len >= 0);
-
+
while (new_len > string->space)
{
if (string->space == 0)
- string->space = 1;
+ string->space = 1;
else
- string->space *= 2;
+ string->space *= 2;
if (string->space < 0)
- string->space = G_MAXINT;
+ g_error ("%s: glyph string length overflows maximum integer size", G_STRLOC);
}
string->glyphs = g_realloc (string->glyphs, string->space * sizeof (PangoGlyphInfo));