From 22d78e8a82bc3d6d1c18a1cc419be536201a003c Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 19 Apr 2024 12:49:03 +0200 Subject: [PATCH] Fix boolean condition Use the short-circuit operator && between booleans. --- app/src/input_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/input_manager.c b/app/src/input_manager.c index c7a758f4..cb606d40 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -468,7 +468,7 @@ sc_input_manager_process_key(struct sc_input_manager *im, return; case SDLK_DOWN: if (shift) { - if (!repeat & down) { + if (!repeat && down) { apply_orientation_transform(im, SC_ORIENTATION_FLIP_180); } @@ -479,7 +479,7 @@ sc_input_manager_process_key(struct sc_input_manager *im, return; case SDLK_UP: if (shift) { - if (!repeat & down) { + if (!repeat && down) { apply_orientation_transform(im, SC_ORIENTATION_FLIP_180); }