1. libgd
  2. Untitled project
  3. gd-libgd

Commits

pajoye  committed 80e78e4

#14, set fserror after the check

  • Participants
  • Parent commits ac4d0ef
  • Branches master

Comments (0)

Files changed (1)

File src/gd_topal.c

View file
   arraysize = (size_t) ((nim->sx + 2) * (3 * sizeof (FSERROR)));
   /* Allocate Floyd-Steinberg workspace. */
 	cquantize->fserrors = gdRealloc(cquantize->fserrors, arraysize);
-	memset(cquantize->fserrors, 0, arraysize);
   if (!cquantize->fserrors)
     {
       goto outOfMemory;
     }
+  memset(cquantize->fserrors, 0, arraysize);
   cquantize->on_odd_row = FALSE;
 
   /* Do the work! */