From 05e35b81f65383a9f34a2931a95dc2abfcff8aa6 Mon Sep 17 00:00:00 2001 From: moe li Date: Mon, 25 May 2026 16:48:36 +0800 Subject: [PATCH] return -1 when no exit code presents in WaitProcess() --- src/rcore.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 31e3e053c..05a6dd0dd 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -4587,11 +4587,9 @@ RLAPI int WaitProcess(Process process) // Normal exit return WEXITSTATUS(status); } - else if (WIFSIGNALED(status)) - { - // Terminated by signal - return -1; - } + + // Terminated by signal or other non-normal exit + return -1; } else {