# HG changeset patch # User Adam Kaminski # Date 1625575431 14400 # Tue Jul 06 08:43:51 2021 -0400 # Node ID 15166e638fba7841f3989cbb93767baa2c5e9b95 # Parent 03a4eff36210dd6203b5888926a6e340bb352c37 Fixed excessively long player names not being truncated properly if they didn't use any color codes. diff -r 03a4eff36210 -r 15166e638fba src/v_text.cpp --- a/src/v_text.cpp Mon Jul 05 18:00:27 2021 -0400 +++ b/src/v_text.cpp Tue Jul 06 08:43:51 2021 -0400 @@ -675,6 +675,13 @@ tempString += "\\c-"; } + // [AK] Even if the name doesn't use any color codes, still make sure that its length + // doesn't exceed the maximum allowed characters in a player's name. + else if ( tempString.Len( ) > MAXPLAYERNAME ) + { + tempString.Truncate( MAXPLAYERNAME ); + } + V_ColorizeString ( tempString ); String = tempString;