From dfc61f260d44d0442640e288171fb165bd251d7b Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 12 Sep 2002 12:15:34 +0000 Subject: [PATCH] a little extra error checking in keynum lookup git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2364 d7cf8633-e32d-0410-b094-e92efae38249 --- keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keys.c b/keys.c index afd0b70f..b60c056a 100644 --- 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 -- 2.39.2