mirror of
https://github.com/nothings/stb
synced 2024-12-15 20:32:33 +03:00
Merge branch 'patch-1' of https://github.com/StylishTriangles/stb into work2
This commit is contained in:
commit
ecf2a56f6d
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user