aboutsummaryrefslogtreecommitdiff
path: root/tr8as.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-09 17:03:24 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-09 17:03:24 +0100
commitc486618ae83fa7c822b29ab7f3f6f8f119112dd6 (patch)
treeba9cd35b864a843efa6dcd4bb63ea8e8525f02fb /tr8as.c
parent00f66fd0d5de41b4c2fdaa7ec2ddf42d041e6af4 (diff)
downloadtr8vm-c486618ae83fa7c822b29ab7f3f6f8f119112dd6.tar.gz
tr8vm-c486618ae83fa7c822b29ab7f3f6f8f119112dd6.zip
More sensible check
Diffstat (limited to 'tr8as.c')
-rw-r--r--tr8as.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tr8as.c b/tr8as.c
index aa5439d..6206132 100644
--- a/tr8as.c
+++ b/tr8as.c
@@ -318,13 +318,13 @@ done:
static uint8_t parse_register(char *word)
{
- if (!strcasecmp(word, "a"))
+ if ((*word == 'a' || *word == 'A') && word[1] == 0)
return 0;
- if (!strcasecmp(word, "b"))
+ if ((*word == 'b' || *word == 'B') && word[1] == 0)
return 1;
- if (!strcasecmp(word, "x"))
+ if ((*word == 'x' || *word == 'X') && word[1] == 0)
return 2;
- if (!strcasecmp(word, "y"))
+ if ((*word == 'y' || *word == 'Y') && word[1] == 0)
return 3;
return 0xff;