]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
a little extra error checking in keynum lookup
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Sep 2002 12:15:34 +0000 (12:15 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Sep 2002 12:15:34 +0000 (12:15 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2364 d7cf8633-e32d-0410-b094-e92efae38249

keys.c

diff --git a/keys.c b/keys.c
index afd0b70f8e8c78d55cdf0263a1a3f426b3ecb3ac..b60c056a0dfe23a50bf62c9abd448e994e07dc54 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -461,7 +461,7 @@ void Key_SetBinding (int keynum, char *binding)
        char    *new;
        int             l;
                        
-       if (keynum == -1)
+       if (keynum < 0 || keynum >= 256)
                return;
 
 // free old bindings