From: terencehill Date: Sun, 6 Oct 2019 07:56:10 +0000 (+0200) Subject: Add missing return, it fixes #2308 "Fake victory in TicTacToe against computer" X-Git-Tag: xonotic-v0.8.5~1248 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c467126c89c898dc59e7dd6b98d6898c464457fa;p=xonotic%2Fxonotic-data.pk3dir.git Add missing return, it fixes #2308 "Fake victory in TicTacToe against computer" --- 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"); }