Merge branch 'patch-1' of https://github.com/StylishTriangles/stb into work2

This commit is contained in:
Sean Barrett 2020-02-02 08:03:06 -08:00
commit ecf2a56f6d

View File

@ -5144,7 +5144,7 @@ static int stbi__shiftsigned(unsigned int v, int shift, int bits)
v <<= -shift; v <<= -shift;
else else
v >>= shift; v >>= shift;
STBI_ASSERT(v >= 0 && v < 256); STBI_ASSERT(v < 256);
v >>= (8-bits); v >>= (8-bits);
STBI_ASSERT(bits >= 0 && bits <= 8); STBI_ASSERT(bits >= 0 && bits <= 8);
return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];