diff --git a/winpr/libwinpr/utils/lodepng/lodepng.c b/winpr/libwinpr/utils/lodepng/lodepng.c index 227d46906..87f85080e 100644 --- a/winpr/libwinpr/utils/lodepng/lodepng.c +++ b/winpr/libwinpr/utils/lodepng/lodepng.c @@ -327,7 +327,8 @@ static void string_set(char** out, const char* in) static unsigned lodepng_read32bitInt(const unsigned char* buffer) { - return (unsigned)((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]); + return (unsigned)(((unsigned)buffer[0] << 24) | ((unsigned)buffer[1] << 16) | + ((unsigned)buffer[2] << 8) | buffer[3]); } #if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)