From: Holger Schemel Date: Thu, 28 Oct 2021 14:39:54 +0000 (+0200) Subject: fixed lock-up when auto-testing tape which causes loop in game engine X-Git-Tag: 4.3.0.0~9 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7b65f3fc5f03b81a39d84dc4b5dce661a32640b3;p=rocksndiamonds.git 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). --- 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