diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-25 23:36:55 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-25 23:36:55 +0200 |
commit | f83a0078b6faf4c094cdd7777b193534be7b4272 (patch) | |
tree | 9b52bc31fe7d826dec6bc953a466ef1f1e0ccad4 /testxml/testxml.py | |
parent | e94d56765ffc8d2479b7955b9e00ffbb6f8e0304 (diff) | |
download | evol-tools-f83a0078b6faf4c094cdd7777b193534be7b4272.tar.gz evol-tools-f83a0078b6faf4c094cdd7777b193534be7b4272.tar.bz2 evol-tools-f83a0078b6faf4c094cdd7777b193534be7b4272.tar.xz evol-tools-f83a0078b6faf4c094cdd7777b193534be7b4272.zip |
testxml: fix crash in incorrect maps.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-x | testxml/testxml.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 65a306d..520430c 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -1125,6 +1125,9 @@ def testCollisionLayer(file, layer): if y2 < 0: y2 = 0 + if arr is None: + return tileset + for x in range(0, layer.width): if haveTiles == True: break @@ -1158,7 +1161,7 @@ def showLayerErrors(file, points, msg, iserr): def getLDV(arr, index): - return arr[index] | (arr[index + 1] << 8) | (arr[index + 2] << 16) \ + return arr[index] | (arr[index + 1] << 8) | (arr[index + 2] << 16) \ | (arr[index + 3] << 24) def testLayer(file, node, name, width, height, layer, tiles): |