Treat <> and << operators as < and >< and >> as > in scripts

(bug #4597)
pull/1877/head
Capostrophic 6 years ago committed by Capostrophic
parent 7f3769d5fc
commit a06c9c767d

@ -98,6 +98,7 @@
Bug #4575: Weird result of attack animation blending with movement animations
Bug #4576: Reset of idle animations when attack can not be started
Bug #4591: Attack strength should be 0 if player did not hold the attack button
Bug #4597: <> operator causes a compile error
Feature #1645: Casting effects from objects
Feature #2606: Editor: Implemented (optional) case sensitive global search
Feature #3083: Play animation when NPC is casting spell via script

@ -502,6 +502,11 @@ namespace Compiler
if (get (c) && c!='=') // <== is a allowed as an alternative to <= :(
putback (c);
}
else if (c == '<' || c == '>') // Treat <> and << as <
{
special = S_cmpLT;
mErrorHandler.warning (std::string("invalid operator <") + c + ", treating it as <", mLoc);
}
else
{
putback (c);
@ -525,6 +530,11 @@ namespace Compiler
if (get (c) && c!='=') // >== is a allowed as an alternative to >= :(
putback (c);
}
else if (c == '<' || c == '>') // Treat >< and >> as >
{
special = S_cmpGT;
mErrorHandler.warning (std::string("invalid operator >") + c + ", treating it as >", mLoc);
}
else
{
putback (c);

Loading…
Cancel
Save