forked from old/legacy-imlib2
WEBP loader: fix key selecting last frame
as far as i can tell, iter is being used uninitialized here leading to reading garbage values resulting in the last frame always being selected when key is present.
This commit is contained in:
parent
e0e4f883e9
commit
524d439adf
|
@ -39,6 +39,7 @@ load2(ImlibImage * im, int load_data)
|
|||
if (im->key)
|
||||
{
|
||||
frame = atoi(im->key);
|
||||
iter.num_frames = WebPDemuxGetI(demux, WEBP_FF_FRAME_COUNT);
|
||||
if (frame > iter.num_frames)
|
||||
frame = 0; /* Select last */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue