Skip to content

Commit 6e99451

Browse files
committed
input_config_parse_button - no more ISDIGIT use
1 parent 6d07ac4 commit 6e99451

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

configuration.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7030,11 +7030,8 @@ void input_config_parse_joy_button(
70307030
config_file_t *conf = (config_file_t*)data;
70317031
struct retro_keybind *bind = (struct retro_keybind*)bind_data;
70327032
struct config_entry_list *tmp_a = NULL;
7033-
70347033
tmp[0] = '\0';
7035-
70367034
fill_pathname_join_delim(key, s, "btn", '_', sizeof(key));
7037-
70387035
if (config_get_array(conf, key, tmp, sizeof(tmp)))
70397036
{
70407037
btn = tmp;
@@ -7050,7 +7047,7 @@ void input_config_parse_joy_button(
70507047
{
70517048
const char *str = btn + 1;
70527049
/* Parse hat? */
7053-
if (str && ISDIGIT((int)*str))
7050+
if (str && *str >= '0' && *str <= '9')
70547051
{
70557052
char *dir = NULL;
70567053
uint16_t hat = strtoul(str, &dir, 0);
@@ -7061,16 +7058,12 @@ void input_config_parse_joy_button(
70617058
}
70627059
else
70637060
bind->joykey = strtoull(tmp, NULL, 0);
7064-
70657061
bind->valid = true;
70667062
}
70677063
}
7068-
70697064
fill_pathname_join_delim(key, s,
70707065
"btn_label", '_', sizeof(key));
7071-
70727066
tmp_a = config_get_entry(conf, key);
7073-
70747067
if (tmp_a && !string_is_empty(tmp_a->value))
70757068
{
70767069
if (!string_is_empty(bind->joykey_label))

0 commit comments

Comments
 (0)