moved getting restart message to request function
authorHolger Schemel <info@artsoft.org>
Wed, 22 Mar 2023 18:22:22 +0000 (19:22 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 22 Mar 2023 18:22:22 +0000 (19:22 +0100)
src/game.c

index 6e0914df5e867453e176780bf7daf1d940a1ee48..ecc1cea08e9ee3467d35bba375297df454152a33 100644 (file)
@@ -15649,8 +15649,9 @@ static char *getRestartGameMessage(void)
   return message;
 }
 
-static void RequestRestartGame(char *message)
+static void RequestRestartGame(void)
 {
+  char *message = getRestartGameMessage();
   boolean has_started_game = hasStartedNetworkGame();
   int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM);
   int door_state = DOOR_CLOSE_1;
@@ -15710,7 +15711,7 @@ boolean CheckRestartGame(void)
   if (!setup.ask_on_game_over)
     return FALSE;
 
-  RequestRestartGame(getRestartGameMessage());
+  RequestRestartGame();
 
   return TRUE;
 }