Wassimulator / CactusViewer

A small single file image viewer written in C/C++.
BSD 2-Clause "Simplified" License
204 stars 15 forks source link

Opening older gif crashes Cactus Viewer #28

Open askebv opened 11 months ago

askebv commented 11 months ago

It crashes (access violation 0x0) in source.cpp/render() on if (delta >= G->anim_frame_delays[G->anim_index] && G->anim_play) { because G->anim_frame_delays = delays; is 0.

and I suppose it needed to be set in stb.c/static unsigned char *stbi_xload(stbi__context *s, int *x, int *y, int *frames, int **delays) but the if (stbi__gif_test(s)) returns false and thus never calls stbi__load_gif_main which very much looks like where it's set.

That's all the investigating I have time for, sorry.

One of the files that causes the crash: amazing_adventures_116x87 1