Add missing return, it fixes #2308 "Fake victory in TicTacToe against computer"
authorterencehill <piuntn@gmail.com>
Sun, 6 Oct 2019 07:56:10 +0000 (09:56 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 6 Oct 2019 07:56:10 +0000 (09:56 +0200)
qcsrc/common/minigames/minigame/ttt.qc

index 6bac28c..ea0c9c3 100644 (file)
@@ -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");
        }