# HG changeset patch # User Adam Kaminski # Date 1616379731 14400 # Sun Mar 21 22:22:11 2021 -0400 # Node ID ebe5c4bbf69b0cec6505720125a0cb9c06b03d8d # Parent ea2f3cf2ebc6b7bcad0f328a9d56577ad80f07e6 Fixed a GCC compile error. diff -r ea2f3cf2ebc6 -r ebe5c4bbf69b src/chat.cpp --- a/src/chat.cpp Sun Mar 21 22:18:33 2021 +0100 +++ b/src/chat.cpp Sun Mar 21 22:22:11 2021 -0400 @@ -165,8 +165,10 @@ { Printf( "cl_chatprefix cannot be greater than 16 characters in length!\n" ); - FString truncatedPrefix = self; - self = truncatedPrefix.Left( 16 ); + char truncatedPrefix[17]; + strncpy( truncatedPrefix, self, 16 ); + truncatedPrefix[16] = 0; + self = truncatedPrefix; } } @@ -178,8 +180,10 @@ { Printf( "cl_chatsuffix cannot be greater than 16 characters in length!\n" ); - FString truncatedSuffix = self; - self = truncatedSuffix.Left( 16 ); + char truncatedSuffix[17]; + strncpy( truncatedSuffix, self, 16 ); + truncatedSuffix[16] = 0; + self = truncatedSuffix; } }