diff --git a/Content.Server/Speech/EntitySystems/ReplacementAccentSystem.cs b/Content.Server/Speech/EntitySystems/ReplacementAccentSystem.cs index 0671a25201..36fa7e07ad 100644 --- a/Content.Server/Speech/EntitySystems/ReplacementAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/ReplacementAccentSystem.cs @@ -53,8 +53,10 @@ namespace Content.Server.Speech.EntitySystems // this is kind of slow but its not that bad // essentially: go over all matches, try to match capitalization where possible, then replace // rather than using regex.replace - foreach (Match match in Regex.Matches(message, $@"(? 0; i--) { + // fetch the match again as the character indices may have changed + Match match = Regex.Match(message, $@"(?