summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-12 16:31:32 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-12 16:31:32 +0000
commit2d2daf56dfd6e6f7e88192154baba2ba80636043 (patch)
tree4796c208fad63267bc5686f36cf5b4d712bb7f3b /src
parent960472a38a2d354c0828527b3684bd7d49bd421c (diff)
downloadhercules-2d2daf56dfd6e6f7e88192154baba2ba80636043.tar.gz
hercules-2d2daf56dfd6e6f7e88192154baba2ba80636043.tar.bz2
hercules-2d2daf56dfd6e6f7e88192154baba2ba80636043.tar.xz
hercules-2d2daf56dfd6e6f7e88192154baba2ba80636043.zip
Fixed bugreport:6459 yet another variable assignment fix, special thanks to joseph for bringing this to our attention.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16625 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index f3116b569..a6a8eaa17 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1192,8 +1192,10 @@ const char* parse_variable(const char* p) {
add_scriptl(word);
}
- if( type == C_ADD_PP || type == C_SUB_PP ) {// incremental operator for the method
+ if( type != C_EQ )
add_scriptc(C_REF);
+
+ if( type == C_ADD_PP || type == C_SUB_PP ) {// incremental operator for the method
add_scripti(1);
add_scriptc(type == C_ADD_PP ? C_ADD : C_SUB);
} else {// process the value as an expression
@@ -3398,7 +3400,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
case 'r':
if( !data_isreference(data) )
{// variables
- ShowWarning("Unexpected type for argument %d. Expected variable.\n", idx-1);
+ ShowWarning("Unexpected type for argument %d. Expected variable, got %s.\n", idx-1,script_op2name(data->type));
script_reportdata(data);
invalid++;
}