Commit 790916b2 authored by twanvl's avatar twanvl

== and != default to strings instead of ints

parent 05061762
...@@ -242,8 +242,10 @@ void instrUnary (UnaryInstructionType i, ScriptValueP& a) { ...@@ -242,8 +242,10 @@ void instrUnary (UnaryInstructionType i, ScriptValueP& a) {
a = to_script(a->toString() OP b->toString()); \ a = to_script(a->toString() OP b->toString()); \
} else if (at == SCRIPT_DOUBLE || bt == SCRIPT_DOUBLE) { \ } else if (at == SCRIPT_DOUBLE || bt == SCRIPT_DOUBLE) { \
a = to_script((double)*a OP (double)*b); \ a = to_script((double)*a OP (double)*b); \
} else { \ } else if (at == SCRIPT_INT || bt == SCRIPT_INT ) { \
a = to_script((int)*a OP (int)*b); \ a = to_script((int)*a OP (int)*b); \
} else { \
a = to_script(a->toString() OP b->toString()); \
} \ } \
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment