Skip to content
Myr

stbi_is_hdr_from_file needs to reset file position

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent 87352fd · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:stb_image.h+4 added-1 removed
1331 unmodified lines
13321333STBIDEF int stbi_is_hdr_from_file(FILE *f)1334{1335 #ifndef STBI_NO_HDR1336 long pos = ftell(f), res;1337 stbi__context s;1338 stbi__start_file(&s,f);1338 return stbi__hdr_test(&s);1339 res = stbi__hdr_test(&s);1340 fseek(f, pos, SEEK_SET);1341 return res;1342 #else1343 STBI_NOTUSED(f);1344 return 0;1345 #endif
6109 unmodified lines