aboutsummaryrefslogtreecommitdiff
path: root/engines/cryomni3d
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cryomni3d')
-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));
}