From: Shamus Hammons Date: Tue, 10 Nov 2015 19:38:30 +0000 (-0600) Subject: Fix for bug where ^^FOO mnemonics were parsed incorrectly. X-Git-Tag: v2.1.0~186 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=a47cfb0704fdda11fe194a2eab611f3f82e95a03 Fix for bug where ^^FOO mnemonics were parsed incorrectly. --- diff --git a/.gitignore b/.gitignore index 7fff738..a89b4bf 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,9 @@ bugs2/ bugs3/ bugs4/ bugs5/ +bugs6/ +bugs7/ +bugs8/ *.zip features/ +patches/ 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))) { diff --git a/version.h b/version.h index be7e059..394cc6c 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,6 @@ #define MAJOR 1 // Major version number #define MINOR 3 // Minor version number -#define PATCH 16 // Patch release number +#define PATCH 17 // Patch release number #endif // __VERSION_H__