MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_vsnprintf

Function SDL_vsnprintf

deps/SDL2/src/stdlib/SDL_string.c:1373–1381  ·  view source on GitHub ↗

_vsnprintf() doesn't ensure nul termination */

Source from the content-addressed store, hash-verified

1371#if defined(HAVE_LIBC) && defined(__WATCOMC__)
1372/* _vsnprintf() doesn't ensure nul termination */
1373int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap)
1374{
1375 int retval;
1376 if (!fmt) fmt = "";
1377 retval = _vsnprintf(text, maxlen, fmt, ap);
1378 if (maxlen > 0) text[maxlen-1] = '\0';
1379 if (retval < 0) retval = (int) maxlen;
1380 return retval;
1381}
1382#elif defined(HAVE_VSNPRINTF)
1383int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap)
1384{

Callers 9

print_stringFunction · 0.85
SDL_LogMessageVFunction · 0.85
SDL_snprintfcatFunction · 0.85
SDLTest_AssertFunction · 0.85
SDLTest_AssertCheckFunction · 0.85
SDLTest_AssertPassFunction · 0.85
SDLTest_LogFunction · 0.85
SDLTest_LogErrorFunction · 0.85
SDL_snprintfFunction · 0.85

Calls 12

vsnprintfFunction · 0.85
SDL_strtolFunction · 0.85
SDL_strncmpFunction · 0.85
SDL_PrintLongFunction · 0.85
SDL_PrintLongLongFunction · 0.85
SDL_PrintUnsignedLongFunction · 0.85
SDL_PrintFloatFunction · 0.85
SDL_iconv_stringFunction · 0.85
SDL_wcslenFunction · 0.85
SDL_PrintStringFunction · 0.85
SDL_freeFunction · 0.85

Tested by 7

print_stringFunction · 0.68
SDL_snprintfcatFunction · 0.68
SDLTest_AssertFunction · 0.68
SDLTest_AssertCheckFunction · 0.68
SDLTest_AssertPassFunction · 0.68
SDLTest_LogFunction · 0.68
SDLTest_LogErrorFunction · 0.68