aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-09 02:01:14 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-09 02:01:14 -0400
commit45f24807e644f9629395384d903ce9623f3fd9e0 (patch)
tree47f4e6fc79e59bbd0bbd1b983ec0b126a6fbb261
parent2097459711de8069f419fe3ab877adf89ebb86bb (diff)
downloadbw-atari8-tools-45f24807e644f9629395384d903ce9623f3fd9e0.tar.gz
whichbas: fix bug in DEC/HEX$ logic.
-rw-r--r--whichbas.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/whichbas.c b/whichbas.c
index 24da7fa..c040950 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -487,7 +487,9 @@ CALLBACK(handle_op) {
remove_type(BT_TURBO);
} else if(nexttok == OP_NUMCONST || nexttok == OP_HEXCONST || nexttok >= 0x80 || nexttok == OP_GRP_LPAR) {
/* INKEY$ may not be followed by a numeric constant or a variable of any kind, or
- a parenthesized expression. */
+ a parenthesized expression.
+ TODO: determine exactly what all it *can* be followed by, check for that.
+ */
remove_type(BT_TURBO);
}
break;
@@ -505,7 +507,7 @@ CALLBACK(handle_op) {
case 0x5c: /* DEC (function, takes str) in TB, HEX$ (function, takes num) in BXL/BXE */
if(nexttok2 == OP_STRCONST) {
remove_type(BT_BXL_BXE);
- } else if(nexttok2 > 0x80 && (get_vartype(nexttok2) == TYPE_STRING)) {
+ } else if(nexttok2 >= 0x80 && (get_vartype(nexttok2) == TYPE_STRING)) {
/* TODO: see if this test is actually valid! */
remove_type(BT_BXL_BXE);
}