From: divverent Date: Wed, 26 Sep 2007 17:16:08 +0000 (+0000) Subject: "" binds are removed binds (fix behaviour in conjunction with bindmaps not skipping... X-Git-Tag: xonotic-v0.1.0preview~2885 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=090ba3ef945de0fb47688f31a76868606d51aa4d;p=xonotic%2Fdarkplaces.git "" binds are removed binds (fix behaviour in conjunction with bindmaps not skipping over "" binds - note that unbind also binds to "") git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7592 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/keys.c b/keys.c index 02a1a0d9..9f7bf711 100644 --- a/keys.c +++ b/keys.c @@ -621,6 +621,8 @@ Key_SetBinding (int keynum, int bindmap, const char *binding) Z_Free (keybindings[bindmap][keynum]); keybindings[bindmap][keynum] = NULL; } + if(!binding[0]) // make "" binds be removed --blub + return; // allocate memory for new binding l = strlen (binding); newbinding = (char *)Z_Malloc (l + 1);