jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

backward memset #391

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
someone got a memset backwards.
against svn head

src/init.c - line 2656
-    memset(Brush_container[i].Palette,sizeof(T_Palette),0);
+    memset(Brush_container[i].Palette,0,sizeof(T_Palette));

Original issue reported on code.google.com by yakumo9...@gmail.com on 18 Oct 2010 at 2:47

GoogleCodeExporter commented 9 years ago
"Oops".
Doesn't seem to have harmful effect: The palette is uninitialized, but it's 
never read as long as no brush is stored (width and height are 0)

Original comment by yrizoud on 18 Oct 2010 at 4:22

GoogleCodeExporter commented 9 years ago
here is a diff since its still not fixed. diff against head r1639

Original comment by yakumo9...@gmail.com on 28 Oct 2010 at 1:38

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r1640. Thanks for your vigilance :)

Original comment by yrizoud on 28 Oct 2010 at 7:35