Skip to content

Commit

Permalink
Use vsnprintf instead of _vsnprintf
Browse files Browse the repository at this point in the history
Resolves twhl-community#61

(cherry picked from commit 87bdd89)
  • Loading branch information
SamVanheer authored and LogicAndTrick committed Dec 24, 2021
1 parent 4ddd245 commit c660a44
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cl_dll/cl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ inline int safe_sprintf( char *dst, int len_dst, const char *format, ...)

va_start(v, format);

_vsnprintf(dst,len_dst,format,v);
vsnprintf(dst,len_dst,format,v);

va_end(v);

Expand Down
1 change: 0 additions & 1 deletion common/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ typedef int BOOL;
#define MAX_PATH PATH_MAX
#include <limits.h>
#include <stdarg.h>
#define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d)

#define stricmp strcasecmp
#define _strnicmp strncasecmp
Expand Down
2 changes: 1 addition & 1 deletion game_shared/vgui_checkbutton2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void CCheckButton2::SetText(char const *pText, ...)

va_list marker;
va_start(marker, pText);
_vsnprintf(str, sizeof(str), pText, marker);
vsnprintf(str, sizeof(str), pText, marker);
va_end(marker);

m_Label.setText(str);
Expand Down
2 changes: 1 addition & 1 deletion game_shared/voice_gamemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void VoiceServerDebug( char const *pFmt, ... )
return;

va_start( marker, pFmt );
_vsnprintf( msg, sizeof(msg), pFmt, marker );
vsnprintf( msg, sizeof(msg), pFmt, marker );
va_end( marker );

ALERT( at_console, "%s", msg );
Expand Down

0 comments on commit c660a44

Please sign in to comment.