aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLe Philousophe2019-05-26 18:19:36 +0200
committerEugene Sandulenko2019-06-01 22:43:48 +0200
commit222f6b0e4cd5afc3d6aae8210b71908b111fca19 (patch)
treeba6c1b0b37829c00ddd0a8538e48d940ee63b160
parent57074300caf0340e31308fd7dc7bf3cd78e4e882 (diff)
downloadscummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.tar.gz
scummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.tar.bz2
scummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.zip
CRYOMNI3D: Add assert where needed
-rw-r--r--engines/cryomni3d/cryomni3d.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/cryomni3d/cryomni3d.cpp b/engines/cryomni3d/cryomni3d.cpp
index 92c6314d4c..edf437702b 100644
--- a/engines/cryomni3d/cryomni3d.cpp
+++ b/engines/cryomni3d/cryomni3d.cpp
@@ -347,6 +347,8 @@ bool CryOmni3DEngine::checkKeysPressed(unsigned int numKeys, ...) {
}
void CryOmni3DEngine::copySubPalette(byte *dst, const byte *src, uint start, uint num) {
+ assert(start < 256);
+ assert(start + num < 256);
memcpy(&dst[3 * start], &src[3 * start], 3 * num * sizeof(*dst));
}