From 7b65f3fc5f03b81a39d84dc4b5dce661a32640b3 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 28 Oct 2021 16:39:54 +0200 Subject: [PATCH] fixed lock-up when auto-testing tape which causes loop in game engine It is possible to create endless loops in the game engine by using recursive custom element properties. These endless loops are detected and the user is notified by a request dialog about this problem to be able to stop the running game. When auto-testing tapes on the command line, answering a graphical request dialog is not possible, which causes the program to hang. This fix stops replaying the tape in this case (and skips the request dialog), so auto-testing tapes can continue (with an unsolvable tape). --- src/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 89e9e7fa..abc56d23 100644 --- a/src/game.c +++ b/src/game.c @@ -11713,7 +11713,7 @@ static void GameActionsExt(void) Warn("element '%s' caused endless loop in game engine", EL_NAME(recursion_loop_element)); - RequestQuitGameExt(FALSE, level_editor_test_game, message); + RequestQuitGameExt(program.headless, level_editor_test_game, message); recursion_loop_detected = FALSE; // if game should be continued -- 2.34.1