Mercurial > hg > dmlib
changeset 1438:40797bfd35bf
Fix a warning.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 22 Apr 2018 03:02:35 +0300 |
parents | 0d5295a5af57 |
children | c1dee757de9d |
files | src/stb_image.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stb_image.c Tue Dec 12 02:03:00 2017 +0200 +++ b/src/stb_image.c Sun Apr 22 03:02:35 2018 +0300 @@ -1403,7 +1403,7 @@ // magnitude code followed by receive_extend code int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); int m = 1 << (magbits - 1); - if (k < m) k += (-1 << magbits) + 1; + if (k < m) k += (-1U << magbits) + 1; // if the result is small enough, we can fit it in fast_ac table if (k >= -128 && k <= 127) fast_ac[i] = (Sint16) ((k << 8) + (run << 4) + (len + magbits));