From 7d7696272177c9d6b2840d5acfee68c4204b9fb5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 16 Jun 2011 23:33:26 +0300 Subject: GRAPHICS: Fix decoding of 4bpp PNGs Fixes checkbox in options menu in Sword25. --- graphics/png.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics') diff --git a/graphics/png.cpp b/graphics/png.cpp index e6dceab3fa..c250433222 100644 --- a/graphics/png.cpp +++ b/graphics/png.cpp @@ -202,7 +202,7 @@ Graphics::Surface *PNG::getSurface(const PixelFormat &format) { } // The surface is a whole scanline wide, skip the rest of it. if (_header.bitDepth == 4) - src += output->w / 2; + src += output->w / 2 + output->w % 2; } } -- cgit v1.2.3