From c486618ae83fa7c822b29ab7f3f6f8f119112dd6 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 9 May 2023 17:03:24 +0100 Subject: More sensible check --- tr8as.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tr8as.c') 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; -- cgit v1.2.3