- The _neg_ operator was a copy/paste of the ! operator, and needed to be
  numeric, not boolean.
This commit is contained in:
Paul Beckingham 2014-12-28 09:18:59 -05:00
parent 78f1f29db1
commit c0424cedeb

View file

@ -273,13 +273,17 @@ void Eval::evaluatePostfixStack (
Variant right = values.back (); Variant right = values.back ();
values.pop_back (); values.pop_back ();
Variant result (0);
result -= right;
if (_debug) if (_debug)
{ {
context.debug (format ("[{1}] eval pop '{2}'", values.size () + 1, (std::string) right)); context.debug (format ("[{1}] eval pop '{2}'", values.size () + 1, (std::string) right));
context.debug (format ("[{1}] eval operator '{2}'", values.size (), token->first)); context.debug (format ("[{1}] eval operator '{2}'", values.size (), token->first));
context.debug (format ("[{1}] eval result push '{2}'", values.size (), (bool) !right)); context.debug (format ("[{1}] eval result push '{2}'", values.size (), (std::string) result));
} }
values.push_back (Variant (0) - right); values.push_back (result);
} }
else if (token->second == Lexer::typeOperator && else if (token->second == Lexer::typeOperator &&
token->first == "_pos_") token->first == "_pos_")