From c6217dc7a74cbfec06791eb460875d73c12c4574 Mon Sep 17 00:00:00 2001 From: Chris Ison Date: Sat, 3 Aug 2002 00:19:41 +0000 Subject: [PATCH] fix bug where -commands where executed and command buffer could be filled when key repeated --- libs/video/targets/keys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/video/targets/keys.c b/libs/video/targets/keys.c index 39f536978..03a36b558 100644 --- a/libs/video/targets/keys.c +++ b/libs/video/targets/keys.c @@ -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);