From b7d4ece827c45408b6fc04c5d44ea2046df4b340 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 21 Apr 2013 00:26:16 +0200 Subject: HOPKINS: Add extra sanity check CID 1004008 --- engines/hopkins/objects.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/hopkins/objects.cpp') diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index f139ee55ab..6887b2947f 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -3087,6 +3087,7 @@ void ObjectsManager::setBobAnimDataIdx(int idx, int animIdx) { * Set Hopkins animation */ void ObjectsManager::setBobAnimation(int idx) { + assert (idx < 36); BobItem *bob = &_bob[idx]; if (!bob->_disabledAnimationFl) return; @@ -3102,6 +3103,7 @@ void ObjectsManager::setBobAnimation(int idx) { * Stop Hopkins animation */ void ObjectsManager::stopBobAnimation(int idx) { + assert (idx < 36); _bob[idx]._disabledAnimationFl = true; } -- cgit v1.2.3