Fix 8 bit grayscale without alpha PNGs not being decoded correctly

This commit is contained in:
UnknownShadow200 2024-12-09 21:25:26 +11:00
parent 744ea58b9d
commit 4b3b3517b7

View File

@ -193,7 +193,7 @@ static void Png_Expand_GRAYSCALE_4(int width, BitmapCol* palette, cc_uint8* src,
static void Png_Expand_GRAYSCALE_8(int width, BitmapCol* palette, cc_uint8* src, BitmapCol* dst) {
cc_uint8 rgb;
src += (width - 1) * 2;
src += (width - 1);
dst += (width - 1);
for (; width >= 4; width -= 4) {