From d91bd593e8c96a6c0e5954c4f889bde02f7b3f6a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 3 Nov 2010 21:43:37 +0000 Subject: [PATCH] - added more info related to ultifds error message to see what triggers the issue --- source/glest_game/world/map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glest_game/world/map.cpp b/source/glest_game/world/map.cpp index c71ddad56..3aba9eb40 100644 --- a/source/glest_game/world/map.cpp +++ b/source/glest_game/world/map.cpp @@ -120,7 +120,7 @@ int Map::getSurfaceCellArraySize() const { SurfaceCell *Map::getSurfaceCell(int sx, int sy) const { int arrayIndex = sy * surfaceW + sx; if(arrayIndex >= getSurfaceCellArraySize()) { - throw runtime_error("arrayIndex >= getSurfaceCellArraySize()"); + throw runtime_error("arrayIndex >= getSurfaceCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " surfaceW = " + surfaceW + " surfaceH = " + surfaceH); } else if(surfaceCells == NULL) { throw runtime_error("surfaceCells == NULL"); @@ -136,6 +136,7 @@ Cell *Map::getCell(int x, int y) const { int arrayIndex = y * w + x; if(arrayIndex >= getCellArraySize()) { throw runtime_error("arrayIndex >= getCellArraySize()"); + throw runtime_error("arrayIndex >= getCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " w = " + w + " h = " + h); } else if(cells == NULL) { throw runtime_error("cells == NULL");