mirror of
https://github.com/nothings/stb
synced 2024-12-13 19:47:10 +03:00
stb_image: stbi__bmp_info only rewind stream on error
To be consistent with the other info functions. Fixes issue #892.
This commit is contained in:
parent
ab18d9b250
commit
17bc84e15d
@ -7205,9 +7205,10 @@ static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
|
||||
|
||||
info.all_a = 255;
|
||||
p = stbi__bmp_parse_header(s, &info);
|
||||
if (p == NULL) {
|
||||
stbi__rewind( s );
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
}
|
||||
if (x) *x = s->img_x;
|
||||
if (y) *y = s->img_y;
|
||||
if (comp) {
|
||||
|
Loading…
Reference in New Issue
Block a user