mirror of
https://github.com/glest/glest-source.git
synced 2025-09-09 15:30:41 +02:00
- added more info related to ultifds error message to see what triggers the issue
This commit is contained in:
@@ -120,7 +120,7 @@ int Map::getSurfaceCellArraySize() const {
|
|||||||
SurfaceCell *Map::getSurfaceCell(int sx, int sy) const {
|
SurfaceCell *Map::getSurfaceCell(int sx, int sy) const {
|
||||||
int arrayIndex = sy * surfaceW + sx;
|
int arrayIndex = sy * surfaceW + sx;
|
||||||
if(arrayIndex >= getSurfaceCellArraySize()) {
|
if(arrayIndex >= getSurfaceCellArraySize()) {
|
||||||
throw runtime_error("arrayIndex >= getSurfaceCellArraySize()");
|
throw runtime_error("arrayIndex >= getSurfaceCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " surfaceW = " + surfaceW + " surfaceH = " + surfaceH);
|
||||||
}
|
}
|
||||||
else if(surfaceCells == NULL) {
|
else if(surfaceCells == NULL) {
|
||||||
throw runtime_error("surfaceCells == NULL");
|
throw runtime_error("surfaceCells == NULL");
|
||||||
@@ -136,6 +136,7 @@ Cell *Map::getCell(int x, int y) const {
|
|||||||
int arrayIndex = y * w + x;
|
int arrayIndex = y * w + x;
|
||||||
if(arrayIndex >= getCellArraySize()) {
|
if(arrayIndex >= getCellArraySize()) {
|
||||||
throw runtime_error("arrayIndex >= getCellArraySize()");
|
throw runtime_error("arrayIndex >= getCellArraySize()");
|
||||||
|
throw runtime_error("arrayIndex >= getCellArraySize(), arrayIndex = " + intToStr(arrayIndex) + " w = " + w + " h = " + h);
|
||||||
}
|
}
|
||||||
else if(cells == NULL) {
|
else if(cells == NULL) {
|
||||||
throw runtime_error("cells == NULL");
|
throw runtime_error("cells == NULL");
|
||||||
|
Reference in New Issue
Block a user