diff options
author | Le Philousophe | 2019-05-26 18:19:36 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | 222f6b0e4cd5afc3d6aae8210b71908b111fca19 (patch) | |
tree | ba6c1b0b37829c00ddd0a8538e48d940ee63b160 | |
parent | 57074300caf0340e31308fd7dc7bf3cd78e4e882 (diff) | |
download | scummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.tar.gz scummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.tar.bz2 scummvm-rg350-222f6b0e4cd5afc3d6aae8210b71908b111fca19.zip |
CRYOMNI3D: Add assert where needed
-rw-r--r-- | engines/cryomni3d/cryomni3d.cpp | 2 |
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)); } |