fix potential crash on startup
thx hanicef
This commit is contained in:
1 parent
d1ba4c61d7
commit
aad83a3a9b
1 file changed
+1
-1
+1
-1
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user