Fix for bug where ^^FOO mnemonics were parsed incorrectly.
authorShamus Hammons <jlhamm@acm.org>
Tue, 10 Nov 2015 19:38:30 +0000 (13:38 -0600)
committerShamus Hammons <jlhamm@acm.org>
Tue, 10 Nov 2015 19:38:30 +0000 (13:38 -0600)
.gitignore
expr.c
version.h

index 7fff7385f4a17087ca490202cf2bb5135d83c159..a89b4bf1f87b2ae3fffe9ae94e42547dad149e28 100644 (file)
@@ -17,5 +17,9 @@ bugs2/
 bugs3/
 bugs4/
 bugs5/
+bugs6/
+bugs7/
+bugs8/
 *.zip
 features/
+patches/
diff --git a/expr.c b/expr.c
index 50d1f5ada0c2e30ef71ab0bfd1bec37f349ab8a2..d1b9ac2e08e50114af26a0272cc93f5e0123348b 100644 (file)
--- 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)))
        {
index be7e0590d48e68f617a39c28833863742d5aa01a..394cc6c1386d89df7e930d4b5deafe0e62f71f2a 100644 (file)
--- 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__