From 5caadeba4c349c6c7de82d667eb161007869f558 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 23 Dec 2014 21:33:47 -0600 Subject: [PATCH] Use a null check instead of strlen in ShoveChatStr --- src/ct_chat.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ct_chat.cpp b/src/ct_chat.cpp index 10ff2bffb..78efab9d0 100644 --- a/src/ct_chat.cpp +++ b/src/ct_chat.cpp @@ -343,7 +343,8 @@ static void CT_ClearChatMessage () static void ShoveChatStr (const char *str, BYTE who) { - if (strlen(str) < 1) // Don't send empty messages + // Don't send empty messages + if (str == NULL || str[0] == '\0') return; FString substBuff;