From 60939ec6536ecf85ec30e304e31d85c33dbf8787 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Thu, 3 Sep 2015 11:18:40 -0700 Subject: [PATCH] fix some more signed shifts --- stb_image.h | 2 +- stb_vorbis.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stb_image.h b/stb_image.h index 55edc3e..67d2981 100644 --- a/stb_image.h +++ b/stb_image.h @@ -3544,7 +3544,7 @@ static void stbi__fill_bits(stbi__zbuf *z) { do { 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; } while (z->num_bits <= 24); } diff --git a/stb_vorbis.c b/stb_vorbis.c index 8a549d6..98e96fb 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -1293,7 +1293,7 @@ static uint32 get32(vorb *f) x = get8(f); x += get8(f) << 8; x += get8(f) << 16; - x += get8(f) << 24; + x += (uint32) get8(f) << 24; return x; }