summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-11-30 21:16:19 +0100
committerHaru <haru@dotalux.com>2013-11-30 21:22:13 +0100
commitafb2ed27fcc12f86f2418425dd1e7c9b8234a1f2 (patch)
tree7c04c5a43f74f9620e6bbcda85d949e48c40f86c /src/map
parentb1f4be7a4ce488e688fb08180ed5147120db0fdd (diff)
downloadhercules-afb2ed27fcc12f86f2418425dd1e7c9b8234a1f2.tar.gz
hercules-afb2ed27fcc12f86f2418425dd1e7c9b8234a1f2.tar.bz2
hercules-afb2ed27fcc12f86f2418425dd1e7c9b8234a1f2.tar.xz
hercules-afb2ed27fcc12f86f2418425dd1e7c9b8234a1f2.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c5
1 files changed, 3 insertions, 2 deletions
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);