From 947687ac0de3b95c3f679fa6d5bcfb6cf69be0ee Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 9 Feb 2023 20:56:08 +0200 Subject: [PATCH] Use standard function --- SDL/gui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SDL/gui.c b/SDL/gui.c index c00a531..c7d3c4b 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -567,7 +567,7 @@ static void change_cheat_address_callback(char ch) return; } ch = toupper(ch); - if (!ishexnumber(ch)) return; + if (!isxdigit(ch)) return; unsigned digit_count = 0; const char *s = text_input + 1; @@ -643,7 +643,7 @@ static void change_cheat_value_callback(char ch) SDL_StopTextInput(); return; } - if (!ishexnumber(ch)) return; + if (!isxdigit(ch)) return; ch = toupper(ch); size_t len = strlen(text_input); if (len == 3) { @@ -721,7 +721,7 @@ static void change_cheat_old_value_callback(char ch) SDL_StopTextInput(); return; } - if (!ishexnumber(ch)) return; + if (!isxdigit(ch)) return; ch = toupper(ch); if (strcmp(text_input, "Any") == 0) { strcpy(text_input, "$"); @@ -813,7 +813,7 @@ static void import_cheat_callback(char ch) text_input[0] = 0; return; } - if (ch != '-' && !ishexnumber(ch)) return; + if (ch != '-' && !isxdigit(ch)) return; ch = toupper(ch); size_t len = strlen(text_input); if (len >= 12) {