diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/mmaps_generator/MapBuilder.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index ff2f72f3534..0c41be65cf7 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -215,10 +215,12 @@ namespace MMAP /**************************************************************************/ void MapBuilder::getGridBounds(uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY) const { - maxX = std::numeric_limits<uint32>::max(); - maxY = std::numeric_limits<uint32>::max(); - minX = 0; - minY = 0; + // min and max are initialized to invalid values so the caller iterating the [min, max] range + // will never enter the loop unless valid min/max values are found + maxX = 0; + maxY = 0; + minX = std::numeric_limits<uint32>::max(); + minY = std::numeric_limits<uint32>::max(); float bmin[3] = { 0, 0, 0 }; float bmax[3] = { 0, 0, 0 }; |