fix bug where -commands where executed and command buffer could be filled when key repeated

This commit is contained in:
Chris Ison 2002-08-03 00:19:41 +00:00
parent 8de4d28238
commit c6217dc7a7

View file

@ -400,8 +400,11 @@ Key_Game (knum_t key, short unicode)
if (!kb)
return false;
if (keydown[key] > 1)
return true;
if (kb[0] == '+') {
if (keydown[key] == 1)
if (keydown[key])
snprintf (cmd, sizeof (cmd), "%s %d\n", kb, key);
else
snprintf (cmd, sizeof (cmd), "-%s %d\n", kb + 1, key);