summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-10-05 10:31:34 -0700
committerBen Longbons <b.r.longbons@gmail.com>2012-10-05 10:31:34 -0700
commitb6f264f2c2be32746ea262cd004f7e70e2c1bc19 (patch)
tree1bd93ee61d275b7eae47902645bed29871350005
parent2834004d5ef472def606b5bdbd1ccac46c6f0f79 (diff)
downloadtmwa-b6f264f2c2be32746ea262cd004f7e70e2c1bc19.tar.gz
tmwa-b6f264f2c2be32746ea262cd004f7e70e2c1bc19.tar.bz2
tmwa-b6f264f2c2be32746ea262cd004f7e70e2c1bc19.tar.xz
tmwa-b6f264f2c2be32746ea262cd004f7e70e2c1bc19.zip
Fix getarraysize on string arrays.
Python has spoiled me :/
-rw-r--r--src/map/script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.cpp b/src/map/script.cpp
index b5b9618..fac5ad5 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -2587,7 +2587,7 @@ static int getarraysize (struct script_state *st, int num, int postfix)
for (; i < 128; i++)
{
struct script_data vd = get_val2 (st, num + (i << 24));
- if (postfix == '$' ? bool(vd.u.str) : bool(vd.u.num))
+ if (postfix == '$' ? bool(*vd.u.str) : bool(vd.u.num))
c = i;
}
return c + 1;