From f3c0b6a2de79944856c4bc181602f3ae2e3b030e Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 3 Sep 2004 08:01:18 +0000 Subject: [PATCH] (update_seq_area): Use malloc and free for gstring.glyphs. --- example/otfview.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/otfview.c b/example/otfview.c index 57fcd7d..809b69c 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -297,7 +297,7 @@ update_seq_area () int unitsPerEm = face->units_per_EM; gstring.size = gstring.used = len; - gstring.glyphs = alloca (sizeof (OTF_Glyph) * len); + gstring.glyphs = malloc (sizeof (OTF_Glyph) * len); memset (gstring.glyphs, 0, sizeof (OTF_Glyph) * len); for (i = 0; i < len; i++) gstring.glyphs[i].c = gstring.glyphs[i].glyph_id = glyph_rec.glyphs[i]; @@ -433,6 +433,8 @@ update_seq_area () else base = g, base_width = advance; } + free (gstring.glyphs); + XtSetArg (arg[0], XtNbitmap, seq_pixmap); XtSetValues (seq_image, arg, 1); } -- 1.7.10.4