From eb6d9f2d023b2bd1bbe46c91864c9376db9fedc6 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Tue, 12 Jul 2005 14:49:58 +0000 Subject: [PATCH] Mantis 0001051: o Fixed bug where chat text would turn white when a player joined a team An uncapped strcpy overwrote the color array. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@264 67975925-1194-0748-b3d5-c16f83f1a3a1 --- main/source/cl_dll/saytext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/source/cl_dll/saytext.cpp b/main/source/cl_dll/saytext.cpp index 23c64f9a..2699e35f 100644 --- a/main/source/cl_dll/saytext.cpp +++ b/main/source/cl_dll/saytext.cpp @@ -247,7 +247,7 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn } } - strncpy( g_szLineBuffer[i], pszBuf, max(iBufSize -1, MAX_CHARS_PER_LINE-1) ); + strncpy( g_szLineBuffer[i], pszBuf, min(iBufSize -1, MAX_CHARS_PER_LINE-1) ); // make sure the text fits in one line EnsureTextFitsInOneLineAndWrapIfHaveTo( i );