From afb2ed27fcc12f86f2418425dd1e7c9b8234a1f2 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 30 Nov 2013 21:16:19 +0100 Subject: Fixed an issue with assignment operators and expressions - Assignment operators would not work correctly, or at all, when followed by an expression (as opposed as a value). - Fixes bugreport:7864, thanks to Lelouch, Ind. - Added associativity tests for those operators to the self-test script. - Added total error count to the self-test script (thanks to Lighta.) Signed-off-by: Haru --- src/map/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map') diff --git a/src/map/script.c b/src/map/script.c index 107a921f0..d0b69d594 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -960,8 +960,9 @@ const char* parse_variable(const char* p) { parse_variable_sub_push(word, p2); // Push variable onto the stack - if( type != C_EQ ) - script->addc(C_REF); + if( type != C_EQ ) { + parse_variable_sub_push(word, p2); // Push variable onto the stack once again (first argument of setr) + } if( type == C_ADD_POST || type == C_SUB_POST ) { // post ++ / -- script->addi(1); -- cgit v1.2.3-70-g09d2