From ffc32d9f4bb3407aeb8341951fbc2c0f91c3df8c Mon Sep 17 00:00:00 2001 From: Elinsrc <99191833+Elinsrc@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:47:13 +0500 Subject: [PATCH] Update saytext.cpp --- cl_dll/ui/hud/saytext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_dll/ui/hud/saytext.cpp b/cl_dll/ui/hud/saytext.cpp index 024c794..50311dc 100644 --- a/cl_dll/ui/hud/saytext.cpp +++ b/cl_dll/ui/hud/saytext.cpp @@ -199,7 +199,7 @@ static void convert_locations(char* dest, const char* src, size_t count, int pla if (src[0] == '%' && (src[1] == 'l' || src[1] == 'L' || src[1] == 'd' || src[1] == 'D')) { auto loc = gHUD.m_Location.get_player_location(player_id).c_str(); auto loc_len = strlen(loc); - auto bytes_to_copy = min(loc_len, count - i - 1); + auto bytes_to_copy = Q_min(loc_len, count - i - 1); memcpy(&dest[i], loc, bytes_to_copy); i += bytes_to_copy; @@ -305,7 +305,7 @@ void CHudSayText::SayTextPrint( const char *pszBuf, int iBufSize, int clientInde Y_START -= ( line_height * ( MAX_LINES + 1 ) ); } -void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) +void CHudSayText::EnsureTextFitsInOneLineAndWrapIfHaveTo( int line ) { int line_width = 0; GetConsoleStringSize( g_szLineBuffer[line], &line_width, &line_height );