if (img->flags & FLAG_LOOPING)
img->pub.leadin = 0;
+ if (img->pub.leadin >= img->pub.frames) {
+ lbx_error_raise(LBX_EFORMAT);
+ free(img);
+ return NULL;
+ }
+
return img;
}
*/
_lbx_assert(img->wtf == 0); /* version? */
_lbx_assert(img->wtf2 == 0); /* very likely is simply reserved. */
- _lbx_assert(img->pub.frames > img->pub.leadin);
_lbx_assert(!(img->flags & ~FLAG_ALL));
/* Read all offsets. Should be merged with identical code in lbx.c */