summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-09-07 10:32:45 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-09-07 10:32:45 -0700
commitb61447ea2f1c72f48ec1784918e2afd81427b191 (patch)
tree1a578354b32e036dcd6fa845064959a4db26e5ac /src
parent0cb4ed00675361d02d33a1ea73f6c0afcb68fca7 (diff)
downloadtmwa-b61447ea2f1c72f48ec1784918e2afd81427b191.tar.gz
tmwa-b61447ea2f1c72f48ec1784918e2afd81427b191.tar.bz2
tmwa-b61447ea2f1c72f48ec1784918e2afd81427b191.tar.xz
tmwa-b61447ea2f1c72f48ec1784918e2afd81427b191.zip
Increase max script array size from 128 to 256
Diffstat (limited to 'src')
-rw-r--r--src/map/script.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.cpp b/src/map/script.cpp
index 51b15d4..5e96a9f 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -1678,7 +1678,7 @@ void builtin_setarray(ScriptState *st)
if (prefix != '$')
sd = script_rid2sd(st);
- for (int j = 0, i = st->start + 3; i < st->end && j < 128; i++, j++)
+ for (int j = 0, i = st->start + 3; i < st->end && j < 256; i++, j++)
{
if (postfix == '$')
set_reg(sd, ByteCode::VARIABLE, reg.iplus(j), conv_str(st, &AARGO2(i - st->start)));
@@ -1728,7 +1728,7 @@ static
int getarraysize(ScriptState *st, SIR reg, bool is_string)
{
int i = reg.index(), c = i;
- for (; i < 128; i++)
+ for (; i < 256; i++)
{
// This is obviously not what was intended
struct script_data vd = get_val2(st, reg.iplus(i));
@@ -1766,7 +1766,7 @@ void builtin_getelementofarray(ScriptState *st)
if (AARGO2(2).type == ByteCode::VARIABLE)
{
int i = conv_num(st, &AARGO2(3));
- if (i > 127 || i < 0)
+ if (i > 255 || i < 0)
{
PRINTF("script: getelementofarray (operator[]): param2 illegal number %d\n",
i);