From 45f24807e644f9629395384d903ce9623f3fd9e0 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 9 Jul 2024 02:01:14 -0400 Subject: whichbas: fix bug in DEC/HEX$ logic. --- whichbas.c | 6 ++++-- 1 file 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); } -- cgit v1.2.3