Skip to content

Commit

Permalink
Update saytext.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Elinsrc authored Nov 19, 2024
1 parent 333522b commit ffc32d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cl_dll/ui/hud/saytext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit ffc32d9

Please sign in to comment.