summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-25 20:56:54 +0200
committerGitHub <noreply@github.com>2018-06-25 20:56:54 +0200
commitc419726752ebd1b532f487e5683f63232a6c237b (patch)
tree81e1220c7f857f7fb31dc278f15f1cb6216b5205 /src/map/script.c
parentf9eb9bd870314a18165349232edef25ae8057e24 (diff)
parent4146cf9207e2270359dce726aaa8214b2c9cce7a (diff)
downloadhercules-c419726752ebd1b532f487e5683f63232a6c237b.tar.gz
hercules-c419726752ebd1b532f487e5683f63232a6c237b.tar.bz2
hercules-c419726752ebd1b532f487e5683f63232a6c237b.tar.xz
hercules-c419726752ebd1b532f487e5683f63232a6c237b.zip
Merge pull request #2077 from AnnieRuru/39-pre-increment
Fix pre-increment / pre-decrement operator error
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 8a3744f27..ceb97ba54 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=='/') // /