Dmitry Timoshkov dmitry@baikal.ru writes:
Alexandre Julliard julliard@winehq.org wrote:
You cannot do the setjmp in a helper function that you return from. All the calls that can cause a longjmp need to be done inside that function.
Do you have a suggestion how to do that cleanly? Call setjmp() outside and pass jmp_buf by reference to the helper?
I'd suggest to have a single helper function that does everything. The separate width/height fetching can be done by simply looking at the header without involving libpng.