From 1788d1b08cab71393d24a218a842deeea0d66759 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 23 Mar 2008 09:15:31 +0000 Subject: fixed problem with numeric binds --- src/game/client/gc_console.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/client/gc_console.cpp b/src/game/client/gc_console.cpp index c471d717..b2c4c3b3 100644 --- a/src/game/client/gc_console.cpp +++ b/src/game/client/gc_console.cpp @@ -229,9 +229,13 @@ void binds_set(int keyid, const char *str) static int get_key_id(const char *key_name) { - int i = atoi(key_name); - if(i > 0 && i < KEY_LAST) - return i; // numeric + // check for numeric + if(key_name[0] == '#') + { + int i = atoi(key_name+1); + if(i > 0 && i < KEY_LAST) + return i; // numeric + } // search for key for(int i = 0; i < KEY_LAST; i++) -- cgit 1.4.1