aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/palette.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/scumm/palette.cpp b/scumm/palette.cpp
index 7f8290d5da..e6a5fd7648 100644
--- a/scumm/palette.cpp
+++ b/scumm/palette.cpp
@@ -209,11 +209,12 @@ void ScummEngine::setPaletteFromPtr(const byte *ptr, int numcolor) {
if (numcolor < 0) {
if (_features & GF_SMALL_HEADER) {
+ ptr += _resourceHeaderSize;
if (_features & GF_OLD256)
- numcolor = 256;
+ numcolor = READ_LE_UINT16(ptr);
else
- numcolor = READ_LE_UINT16(ptr + 6) / 3;
- ptr += 8;
+ numcolor = READ_LE_UINT16(ptr) / 3;
+ ptr += 2;
} else {
numcolor = getResourceDataSize(ptr) / 3;
}