mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed problem with numeric binds
This commit is contained in:
parent
c03f2a36e8
commit
1788d1b08c
|
@ -229,9 +229,13 @@ void binds_set(int keyid, const char *str)
|
||||||
|
|
||||||
static int get_key_id(const char *key_name)
|
static int get_key_id(const char *key_name)
|
||||||
{
|
{
|
||||||
int i = atoi(key_name);
|
// check for numeric
|
||||||
if(i > 0 && i < KEY_LAST)
|
if(key_name[0] == '#')
|
||||||
return i; // numeric
|
{
|
||||||
|
int i = atoi(key_name+1);
|
||||||
|
if(i > 0 && i < KEY_LAST)
|
||||||
|
return i; // numeric
|
||||||
|
}
|
||||||
|
|
||||||
// search for key
|
// search for key
|
||||||
for(int i = 0; i < KEY_LAST; i++)
|
for(int i = 0; i < KEY_LAST; i++)
|
||||||
|
|
Loading…
Reference in a new issue