Fixed BehaviorSanitizer warnings.
@@ -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)
