From: deathride58 Date: Wed, 6 Dec 2023 21:58:53 +0000 (-0500) Subject: Fixes speech bubbles now lacking names for the living (#22191) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=a4027a3344593cc05cfc85e1666bae5907338151;p=space-station-14.git Fixes speech bubbles now lacking names for the living (#22191) --- diff --git a/Content.Client/Chat/UI/SpeechBubble.cs b/Content.Client/Chat/UI/SpeechBubble.cs index 9808ed1027..91e8e5a90f 100644 --- a/Content.Client/Chat/UI/SpeechBubble.cs +++ b/Content.Client/Chat/UI/SpeechBubble.cs @@ -187,7 +187,7 @@ namespace Content.Client.Chat.UI var rawmsg = message.WrappedMessage; var tagStart = rawmsg.IndexOf($"[{tag}]"); var tagEnd = rawmsg.IndexOf($"[/{tag}]"); - if (tagStart <= 0 || tagEnd <= 0) //the above return -1 if the tag's not found, which in turn will cause the below to throw an exception. a blank speech bubble is far more noticeably broken than the bubble not appearing at all -bhijn + if (tagStart < 0 || tagEnd < 0) //the above return -1 if the tag's not found, which in turn will cause the below to throw an exception. a blank speech bubble is far more noticeably broken than the bubble not appearing at all -bhijn return ""; tagStart += tag.Length + 2; return rawmsg.Substring(tagStart, tagEnd - tagStart);