-
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
Description
Line 710 in c477e85
| inline Q_CRT_FORMAT_STRING_ATTRIBUTE(printf, 2, 3) int StringPrint(char* szBuffer, const char* const szFormat, ...) |
inline Q_CRT_FORMAT_STRING_ATTRIBUTE(printf, 2, 3) int StringPrint(char* szBuffer, const char* const szFormat, ...)
{
va_list args;
va_start(args, szFormat);
const int iReturn = stbsp_vsprintf(szBuffer, szFormat, args);
va_end(args);
return iReturn;
}Line 764 in c477e85
| inline Q_CRT_FORMAT_STRING_ATTRIBUTE(printf, 3, 4) int StringPrintN(char* szBuffer, std::size_t nCount, const char* const szFormat, ...) |
Q_INLINE Q_CRT_FORMAT_STRING_ATTRIBUTE(printf, 3, 4) int StringPrintN(char* szBuffer, std::size_t nCount, const char* const szFormat, ...)
{
// @note: same as https://github.com/rollraw/qo0-csgo/blob/c477e85116d43a534dcb8e887c48091ae4146514/dependencies/imgui/imgui.cpp#L1373
va_list args;
va_start(args, szFormat);
const int iReturn = stbsp_vsnprintf(szBuffer, static_cast<int>(nCount), szFormat, args);
va_end(args);
if (szBuffer == nullptr)
return iReturn ;
if (iReturn == -1 || w >= (int)nCount)
iReturn = (int)nCount - 1;
szBuffer[iReturn] = 0;
return iReturn;
}or we should add a configuration in user.h as Q_USE_USE_STB_SPRINTF since we don't really need to sig scan this, such as waste as we already using stb_sprintf
note: There might be typos cuz yes I typed on github
Reactions are currently unavailable