evas - gif loader - fix technically "wrong" sizeof (doesnt cause a bug)

go from sizeof(char **) to sizeof(char *) ... effectively. so no real bug.
This commit is contained in:
Carsten Haitzler 2014-12-04 16:03:32 +09:00
parent 574919ef31
commit 83512198b8
1 changed files with 4 additions and 4 deletions

View File

@ -211,16 +211,16 @@ _decode_image(GifFileType *gif, DATA32 *data, int rowpix, int xin, int yin,
// build a blob of memory to have pointers to rows of pixels
// AND store the decoded gif pixels (1 byte per pixel) as welll
rows = malloc((h * sizeof(GifRowType *)) + (w * h * sizeof(GifPixelType)));
rows = malloc((h * sizeof(GifRowType)) + (w * h * sizeof(GifPixelType)));
if (!rows) goto on_error;
// fill in the pointers at the start
for (yy = 0; yy < h; yy++)
{
rows[yy] = ((unsigned char *)rows) + (h * sizeof(GifRowType *)) +
rows[yy] = ((unsigned char *)rows) + (h * sizeof(GifRowType)) +
(yy * w * sizeof(GifPixelType));
}
// if give is interlaced, walk interlace pattern and decode into rows
if (gif->Image.Interlace)
{