aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorStrangerke2015-12-07 17:49:22 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:54 +0100
commit743b492ac796b1c3048a611681e21e7040dc1c0c (patch)
tree9acb706478bc62a298de6789b5f4a05702a36370 /engines/lab
parent5bc48cbbddc47ba3d1893776178c19bd33dbee4c (diff)
downloadscummvm-rg350-743b492ac796b1c3048a611681e21e7040dc1c0c.tar.gz
scummvm-rg350-743b492ac796b1c3048a611681e21e7040dc1c0c.tar.bz2
scummvm-rg350-743b492ac796b1c3048a611681e21e7040dc1c0c.zip
LAB: Add safeguards in unDiff()
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/utils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp
index 9e057f8a70..6d4784d0ac 100644
--- a/engines/lab/utils.cpp
+++ b/engines/lab/utils.cpp
@@ -399,11 +399,15 @@ void Utils::unDiff(byte *newBuf, byte *oldBuf, byte *diffData, uint16 bytesPerRo
VUnDiffByteWord((uint16 *)newBuf, (uint16 *)diffData, bytesPerRow);
else if (bufType == 3)
VUnDiffByteLong((uint32 *)newBuf, (uint32 *)diffData, bytesPerRow);
+ else
+ error("Unexpected variable compression scheme %d", bufType);
} else {
if (bufType == 0)
unDiffByteByte(newBuf, diffData);
else if (bufType == 1)
unDiffByteWord((uint16 *)newBuf, (uint16 *)diffData);
+ else
+ error("Unexpected compression scheme %d", bufType);
}
}