MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / V_vsnprintf

Function V_vsnprintf

src/vstdlib/strtools.cpp:282–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282int V_vsnprintf( char *pDest, int bufferLen, char const *pFormat, va_list params )
283{
284 Assert( bufferLen > 0 );
285 Assert( pDest != NULL );
286 Assert( pFormat != NULL );
287
288 int len = _vsnprintf( pDest, bufferLen, pFormat, params );
289
290 // Len < 0 represents an overflow on windows; len > buffer length on posix
291 if (( len < 0 ) || (len >= bufferLen ) )
292 {
293 len = bufferLen-1;
294 }
295 pDest[len] = 0;
296
297 return len;
298}
299
300int V_vsnprintfRet( char *pDest, int bufferLen, const char *pFormat, va_list params, bool *pbTruncated )
301{

Callers 6

V_sprintf_safeFunction · 0.85
V_vsprintf_safeFunction · 0.85
AppendFormatVMethod · 0.85
SendP2PRejectionFunction · 0.85
VaPrintfMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected