mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
d3da8a7367
The color components computation had intermediate results that could overflow a signed int. So now the computation is done using unsigned int instead, which prevents the overflow (since the max intermediate value is 255*255*257*257, which fits in an unsigned int). Note: I also considered adding an explicit cast to do the uint8 * uint8 operations using uint32, but decided not to as it is not required (there is no overflow due to integer promotion) and makes the code more difficult to read.