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
This commit is contained in:
tankefugl 2005-07-12 14:49:58 +00:00
parent b99c007276
commit eb6d9f2d02

View file

@ -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 );