SDL: SDLTest_CommonEvent: only set done when it is finished

From c8372e20d6cba4a6caec20442f76b64464717019 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 27 Feb 2024 11:21:57 +0100
Subject: [PATCH] SDLTest_CommonEvent: only set done when it is finished

---
 src/test/SDL_test_common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 229862afd36a..afbe7f5c8c92 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -2429,7 +2429,9 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
 
 void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
 {
-    *done = SDLTest_CommonEventMainCallbacks(state, event) ? 1 : 0;
+    if (SDLTest_CommonEventMainCallbacks(state, event)) {
+        *done = 1;
+    }
 }
 
 void SDLTest_CommonQuit(SDLTest_CommonState *state)