forked from enlightenment/efl
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:
parent
574919ef31
commit
83512198b8
|
@ -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
|
// build a blob of memory to have pointers to rows of pixels
|
||||||
// AND store the decoded gif pixels (1 byte per pixel) as welll
|
// 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;
|
if (!rows) goto on_error;
|
||||||
|
|
||||||
// fill in the pointers at the start
|
// fill in the pointers at the start
|
||||||
for (yy = 0; yy < h; yy++)
|
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));
|
(yy * w * sizeof(GifPixelType));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if give is interlaced, walk interlace pattern and decode into rows
|
// if give is interlaced, walk interlace pattern and decode into rows
|
||||||
if (gif->Image.Interlace)
|
if (gif->Image.Interlace)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue