From aad83a3a9bdc0033a0fa0daa769b46c2d5ed393c Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 24 Apr 2025 06:56:57 +0200 Subject: [PATCH] fix potential crash on startup thx hanicef --- src/g_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_input.c b/src/g_input.c index f0121f37d..7adb4462a 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -1022,7 +1022,7 @@ INT32 G_KeyStringtoNum(const char *keystr) if (!keystr[0]) return 0; - if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z') + if (!keystr[0] || (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')) return keystr[0]; if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')