keys.c: Key_ConsoleBindable: add a better check for "general bindability".

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1046 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2014-09-21 01:59:36 +00:00
parent 2e23f6a3b5
commit f7276bc483
1 changed files with 4 additions and 1 deletions

View File

@ -1140,7 +1140,10 @@ Key_ConsoleBindable
*/
qboolean Key_ConsoleBindable(int key)
{
if (key < 1 || key > 255)
if (key < 0 || key > 255)
return false;
if (Key_StringToKeynum(Key_KeynumToString(key)) == -1)
return false;
return ((key_dest == key_console || (key_dest == key_game && con_forcedup)) && !consolekeys[key]);