Skip to content

Commit b169e2f

Browse files
committed
Verify CreateGameResults cookie before use
1 parent 5423247 commit b169e2f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

game/addons/menu/Code/Modals/CreateGameModal/CreateGameModal.razor

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,18 @@
148148
ServerName = $"{Sandbox.Utility.Steam.PersonaName}'s game"
149149
} );
150150

151+
//
152+
// Verify cookie data
153+
//
154+
if ( Output.MaxPlayers < MinPlayers )
155+
{
156+
Output.MaxPlayers = MinPlayers;
157+
}
158+
if ( string.IsNullOrEmpty( Output.ServerName ) )
159+
{
160+
ServerName = $"{Sandbox.Utility.Steam.PersonaName}'s game";
161+
}
162+
151163
//
152164
// Apply config / defaults
153165
//

0 commit comments

Comments
 (0)