about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/client/gc_console.cpp10
1 files changed, 7 insertions, 3 deletions
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++)