From 45656e9fcf2b534163a80a1502623c577f125c79 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sun, 5 Mar 2006 23:50:24 +0000 Subject: fixed palette handling regression, as reported on the forum. svn-id: r21108 --- engines/queen/display.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/queen') diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp index d56e472e30..c6833f5045 100644 --- a/engines/queen/display.cpp +++ b/engines/queen/display.cpp @@ -155,7 +155,9 @@ void Display::dynalumUpdate(int16 x, int16 y) { void Display::palSet(const uint8 *pal, int start, int end, bool updateScreen) { debug(9, "Display::palSet(%d, %d)", start, end); const int numColors = end - start + 1; + assert(numColors <= 256); uint8 tempPal[256 * 4]; + pal += start * 3; for (int i = 0; i < numColors; i++) { tempPal[4 * i + 0] = *pal++; tempPal[4 * i + 1] = *pal++; -- cgit v1.2.3