summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2018-06-14 01:38:03 +0800
committerAnnieRuru <jeankof@ymail.com>2018-06-14 01:38:03 +0800
commit4146cf9207e2270359dce726aaa8214b2c9cce7a (patch)
tree6cb44dffcc026d372f8dd5597aff858156a8209f /src/map/script.c
parentfb16806ce0588414c5b808df535b72ef9e7ff6ba (diff)
downloadhercules-4146cf9207e2270359dce726aaa8214b2c9cce7a.tar.gz
hercules-4146cf9207e2270359dce726aaa8214b2c9cce7a.tar.bz2
hercules-4146cf9207e2270359dce726aaa8214b2c9cce7a.tar.xz
hercules-4146cf9207e2270359dce726aaa8214b2c9cce7a.zip
Fix pre-increment / pre-decrement operator error
eg: if (1) ++.@i;
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d9350081a..fd9dab81e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1428,8 +1428,8 @@ const char* script_parse_subexpr(const char* p,int limit)
p=script->skip_space(p);
while((
(op=C_OP3, opl=0, len=1,*p=='?') // ?:
- || (op=C_ADD, opl=9, len=1,*p=='+') // +
- || (op=C_SUB, opl=9, len=1,*p=='-') // -
+ || (op=C_ADD, opl=9, len=1,*p=='+' && p[1]!='+') // +
+ || (op=C_SUB, opl=9, len=1,*p=='-' && p[1]!='-') // -
|| (op=C_POW, opl=11,len=2,*p=='*' && p[1]=='*') // **
|| (op=C_MUL, opl=10,len=1,*p=='*') // *
|| (op=C_DIV, opl=10,len=1,*p=='/') // /