From fd484fc70fca32ff9065b91c175089b65aa3fd26 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Sep 2011 01:31:10 +0300 Subject: Fix infinite loop in map reduce function. --- src/map.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map.cpp b/src/map.cpp index 721967b25..947bb8f09 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2015,7 +2015,10 @@ void Map::reduce() { MapLayer *layer = *ri; if (x >= layer->mWidth || y >= layer->mHeight) + { + ++ ri; continue; + } Image *img = layer->mTiles[x + y * layer->mWidth]; if (img && !img->isAlphaVisible()) -- cgit v1.2.3-70-g09d2