From a8e5fdf5860eba422cbfba73dffec160761316cc Mon Sep 17 00:00:00 2001 From: brine Date: Mon, 6 Nov 2023 22:04:03 -0500 Subject: [PATCH] Remove invalid filename characters from hosted game names, so they don't freeze OCTGN when trying to join an affected game. --- octgnFX/Octgn.JodsEngine/Play/State/GameEngine.cs | 2 +- recentchanges.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/octgnFX/Octgn.JodsEngine/Play/State/GameEngine.cs b/octgnFX/Octgn.JodsEngine/Play/State/GameEngine.cs index 6ff3a41ebe..731aafec5e 100644 --- a/octgnFX/Octgn.JodsEngine/Play/State/GameEngine.cs +++ b/octgnFX/Octgn.JodsEngine/Play/State/GameEngine.cs @@ -503,7 +503,7 @@ public void OnStart() { return; } - Program.GameEngine.History.Name = _gameName; + Program.GameEngine.History.Name = string.Concat(_gameName.Split(Path.GetInvalidFileNameChars())); if (_historyPath == null) { var dir = new DirectoryInfo(Config.Instance.Paths.GameHistoryPath); diff --git a/recentchanges.txt b/recentchanges.txt index 8b13789179..b62658e6d7 100644 --- a/recentchanges.txt +++ b/recentchanges.txt @@ -1 +1 @@ - +Fixed a bug causing OCTGN to hang if trying to join a game with invalid characters in the lobby name