From 14ce1a6564b6adaba91b518b971cc7be42149dd0 Mon Sep 17 00:00:00 2001 From: axtlos Date: Fri, 5 Apr 2024 00:04:38 +0200 Subject: Fix condition --- keymash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymash.c b/keymash.c index ab635e9..095529a 100644 --- a/keymash.c +++ b/keymash.c @@ -55,7 +55,7 @@ main (int argc, char *argv[]) { } switchup = switchup > 0 ? 0 : switchup-1; } - if (switchup < 2 || switchup > -2) { + if (switchup < 2 && switchup > -2) { val = abs(rand() % 2); } else { val = switchup < 0 ? 0 : 1; -- cgit v1.2.3