From 8fbf09d1c7c834f288be87fc96fb34a499effb7c Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 21 Nov 2020 17:05:02 +0000 Subject: [PATCH] Fixed minor Coverity issue (CID 1446646) --- source/Joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Joystick.cpp b/source/Joystick.cpp index 5ed22b1b..7441c288 100644 --- a/source/Joystick.cpp +++ b/source/Joystick.cpp @@ -507,7 +507,7 @@ static void DoAutofire(UINT uButton, BOOL& pressed) BOOL nowPressed = pressed; if (sg_PropertySheet.GetAutofire(uButton) && pressed) { - toggle[uButton] = (!lastPressed[uButton]) ? TRUE : toggle[uButton] = !toggle[uButton]; + toggle[uButton] = (!lastPressed[uButton]) ? TRUE : !toggle[uButton]; pressed = pressed && toggle[uButton]; } lastPressed[uButton] = nowPressed;