From 146597dd2de21ea3874edb4b0b519eddeac014da Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Fri, 27 Mar 2009 05:57:19 +0000 Subject: Adjusted calculation of scanline width for ILBM files to account for occasional padding bytes. This fixes the loading of some backgrounds in BRA. svn-id: r39705 --- engines/parallaction/iff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/iff.cpp b/engines/parallaction/iff.cpp index c15e8fcbd2..887157a38f 100644 --- a/engines/parallaction/iff.cpp +++ b/engines/parallaction/iff.cpp @@ -203,7 +203,7 @@ byte *ILBMDecoder::getBitmap(uint32 numPlanes, bool packPlanes) { byte *out = bitmap; // setup a buffer to hold enough data to build a line in the output - uint32 scanWidth = (_header.width + 7) >> 3; + uint32 scanWidth = ((_header.width + 15)/16) << 1; byte *scanBuffer = (byte*)malloc(scanWidth * _header.depth); for (uint i = 0; i < _header.height; ++i) { -- cgit v1.2.3