summaryrefslogtreecommitdiff
path: root/testxml/testxml.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-25 23:36:55 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-25 23:36:55 +0200
commitf83a0078b6faf4c094cdd7777b193534be7b4272 (patch)
tree9b52bc31fe7d826dec6bc953a466ef1f1e0ccad4 /testxml/testxml.py
parente94d56765ffc8d2479b7955b9e00ffbb6f8e0304 (diff)
downloadevol-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-xtestxml/testxml.py5
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):