From: handa Date: Fri, 3 Sep 2004 08:30:17 +0000 (+0000) Subject: (GSTRING_INSERT): Fix size of reallocating X-Git-Tag: REL-0-9-5~115 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5f96e82865a96afac3936fdf449f1c23689f0fac;p=m17n%2Flibotf.git (GSTRING_INSERT): Fix size of reallocating memory. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index f7f2034..975e969 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -53,8 +53,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite char *errfmt = "GSTRING%s"; \ \ gstring->size = gstring->used + len; \ - gstring->glyphs = (OTF_Glyph *) realloc (gstring->glyphs, \ - gstring->size); \ + gstring->glyphs \ + = (OTF_Glyph *) realloc (gstring->glyphs, \ + sizeof (OTF_Glyph) * gstring->size); \ if (! gstring->glyphs) \ OTF_ERROR (OTF_ERROR_MEMORY, ""); \ } \