(GSTRING_INSERT): Fix size of reallocating
authorhanda <handa>
Fri, 3 Sep 2004 08:30:17 +0000 (08:30 +0000)
committerhanda <handa>
Fri, 3 Sep 2004 08:30:17 +0000 (08:30 +0000)
memory.

src/otfdrive.c

index f7f2034..975e969 100644 (file)
@@ -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, "");                             \
       }                                                                        \