From 57550c1997cb0dbcfbe62504579c641ca4f0b177 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sun, 9 Jun 2019 00:24:57 +0530 Subject: HDB: Add assert to check _numTiles --- engines/hdb/draw-manager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/hdb') diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 4845be664a..df04f095d8 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -46,6 +46,8 @@ bool DrawMan::init() { _tLookupArray = new TileLookup[_numTiles]; Common::Array tileData = *g_hdb->_fileMan->findFiles("t32_", TYPE_TILE32); + assert((uint)_numTiles == tileData.size()); + int index = 0, skyIndex = 0; for (; index < _numTiles; index++) { _tLookupArray[index].filename = tileData[index]; -- cgit v1.2.3