From 13bd409bbff3a88e0bf89e9a069f340aed9f4b44 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 May 2014 03:26:44 +0300 Subject: MADS: Add a sanity check for color 255 This is used in scene 752 --- engines/mads/msurface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/mads/msurface.cpp') diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp index 2c9d093877..64b3ae1f23 100644 --- a/engines/mads/msurface.cpp +++ b/engines/mads/msurface.cpp @@ -488,7 +488,8 @@ void MSurface::translate(Common::Array &palette) { byte *pDest = getBasePtr(0, y); for (int x = 0; x < this->w; ++x, ++pDest) { - *pDest = palette[*pDest]._palIndex; + if (*pDest < 255) // scene 752 has some palette indices of 255 + *pDest = palette[*pDest]._palIndex; } } } -- cgit v1.2.3