From 6dec819c46f114337972dce75480c8a68b33c60d Mon Sep 17 00:00:00 2001 From: lalien Date: Thu, 20 Apr 2006 01:19:36 +0000 Subject: [PATCH] Bugfix: CTD when try to pickup items from dead body. (Tiledef.cpp check CHECKF( usIndex < NUMBEROFTILES ); added into GetTileType and GetWallOrientation) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@30 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/tiledef.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TileEngine/tiledef.cpp b/TileEngine/tiledef.cpp index 6ce72e31..e18b6e19 100644 --- a/TileEngine/tiledef.cpp +++ b/TileEngine/tiledef.cpp @@ -1046,6 +1046,7 @@ BOOLEAN GetTileType( UINT16 usIndex, UINT32 *puiType ) TILE_ELEMENT TileElem; CHECKF( usIndex != NO_TILE ); + CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix // Get tile element TileElem = gTileDatabase[ usIndex ]; @@ -1197,6 +1198,7 @@ BOOLEAN GetWallOrientation( UINT16 usIndex, UINT16 *pusWallOrientation ) TILE_ELEMENT TileElem; CHECKF( usIndex != NO_TILE ); + CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix // Get tile element TileElem = gTileDatabase[ usIndex ];