From 741c97ccc7ea6e6dbe78dab5db3786aa0d51c3b3 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 6 May 2020 08:13:29 +0200 Subject: [PATCH] Fix empty sound (fixes #2163) The problem was that the string is empty after going through the trim, thus the main displaying loop doesn't run, but the sound still does. --- src/game/client/components/chat.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index 3e201f23b..2e7eef3bd 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -581,6 +581,11 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine) bool Highlighted = false; char *p = const_cast(pLine); + + // Only empty string left + if(*p == 0) + return; + while(*p) { Highlighted = false;