summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-04 01:31:10 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-04 01:31:10 +0300
commitfd484fc70fca32ff9065b91c175089b65aa3fd26 (patch)
treec62c0e37d258fa3aa76ffbdd093c329b9dcf10aa /src/map.cpp
parent0717b3b4744b8e15751580dbf428c90832c96a56 (diff)
downloadplus-fd484fc70fca32ff9065b91c175089b65aa3fd26.tar.gz
plus-fd484fc70fca32ff9065b91c175089b65aa3fd26.tar.bz2
plus-fd484fc70fca32ff9065b91c175089b65aa3fd26.tar.xz
plus-fd484fc70fca32ff9065b91c175089b65aa3fd26.zip
Fix infinite loop in map reduce function.v1.1.9.4
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp3
1 files changed, 3 insertions, 0 deletions
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())