From c467126c89c898dc59e7dd6b98d6898c464457fa Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 6 Oct 2019 09:56:10 +0200 Subject: [PATCH] Add missing return, it fixes #2308 "Fake victory in TicTacToe against computer" --- qcsrc/common/minigames/minigame/ttt.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/minigames/minigame/ttt.qc b/qcsrc/common/minigames/minigame/ttt.qc index 6bac28c93..ea0c9c368 100644 --- a/qcsrc/common/minigames/minigame/ttt.qc +++ b/qcsrc/common/minigames/minigame/ttt.qc @@ -322,14 +322,14 @@ string ttt_turn_to_string(int turnflags) { // translator-friendly messages composed of 2 existing messages // TODO: proper "you win" banner instead of hijacking the help message - if ( (turnflags&TTT_TURN_TEAM) != minigame_self.team ) - strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!")); + if ( (turnflags & TTT_TURN_TEAM) != minigame_self.team ) + return strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!")); return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!")); } if ( turnflags & TTT_TURN_NEXT ) { - if ( (turnflags&TTT_TURN_TEAM) != minigame_self.team ) + if ( (turnflags & TTT_TURN_TEAM) != minigame_self.team ) return _("Select \"^1Next Match^7\" on the menu to start a new match!"); return _("Wait for your opponent to confirm the rematch"); } -- 2.39.2