X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=expr.c;h=d1b9ac2e08e50114af26a0272cc93f5e0123348b;hp=50d1f5ada0c2e30ef71ab0bfd1bec37f349ab8a2;hb=a47cfb0704fdda11fe194a2eab611f3f82e95a03;hpb=8b1dd903c42afb254e1bffcb42dff44c6e8ab43d diff --git a/expr.c b/expr.c index 50d1f5a..d1b9ac2 100644 --- a/expr.c +++ b/expr.c @@ -311,8 +311,9 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) // followed by the value 101, it will trigger a bad evaluation here. // This is probably a really bad assumption to be making here...! // (assuming tok[1] == EOL is a single token that is) + // Seems that even other tokens (SUNARY type) can fuck this up too. // if ((tok[1] == EOL) - if ((tok[1] == EOL && tok[0] != CONST) + if ((tok[1] == EOL && (tok[0] != CONST && tokenClass[tok[0]] != SUNARY)) || (((*tok == CONST || *tok == SYMBOL) || (*tok >= KW_R0 && *tok <= KW_R31)) && (tokenClass[tok[2]] < UNARY))) {