mirror of
https://github.com/nothings/stb
synced 2024-12-15 12:22:55 +03:00
fix some more signed shifts
This commit is contained in:
parent
a3d62dfec1
commit
60939ec653
@ -3544,7 +3544,7 @@ static void stbi__fill_bits(stbi__zbuf *z)
|
|||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
|
STBI_ASSERT(z->code_buffer < (1U << z->num_bits));
|
||||||
z->code_buffer |= stbi__zget8(z) << z->num_bits;
|
z->code_buffer |= (usigned int) stbi__zget8(z) << z->num_bits;
|
||||||
z->num_bits += 8;
|
z->num_bits += 8;
|
||||||
} while (z->num_bits <= 24);
|
} while (z->num_bits <= 24);
|
||||||
}
|
}
|
||||||
|
@ -1293,7 +1293,7 @@ static uint32 get32(vorb *f)
|
|||||||
x = get8(f);
|
x = get8(f);
|
||||||
x += get8(f) << 8;
|
x += get8(f) << 8;
|
||||||
x += get8(f) << 16;
|
x += get8(f) << 16;
|
||||||
x += get8(f) << 24;
|
x += (uint32) get8(f) << 24;
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user