Merge branch 'rewind-after-bmp-testing' of https://github.com/saitoha/stb into working
This commit is contained in:
commit
fa30cdba89
@ -2897,7 +2897,7 @@ static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Microsoft/Windows BMP image
|
// Microsoft/Windows BMP image
|
||||||
static int stbi__bmp_test(stbi__context *s)
|
static int stbi__bmp_test_raw(stbi__context *s)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
int sz;
|
int sz;
|
||||||
@ -2909,6 +2909,12 @@ static int stbi__bmp_test(stbi__context *s)
|
|||||||
stbi__get32le(s); // discard data offset
|
stbi__get32le(s); // discard data offset
|
||||||
sz = stbi__get32le(s);
|
sz = stbi__get32le(s);
|
||||||
r = (sz == 12 || sz == 40 || sz == 56 || sz == 108);
|
r = (sz == 12 || sz == 40 || sz == 56 || sz == 108);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int stbi__bmp_test(stbi__context *s)
|
||||||
|
{
|
||||||
|
int r = stbi__bmp_test_raw(s);
|
||||||
stbi__rewind(s);
|
stbi__rewind(s);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user