mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 21:47:00 +00:00
Revert "Assert that fmt != NULL before calling vsnprintf (#1969)"
This reverts commit 84183f5bb6
.
This commit is contained in:
parent
80db2383d8
commit
f05aede098
@ -1264,7 +1264,6 @@ static const char* ImAtoi(const char* src, TYPE* output)
|
|||||||
|
|
||||||
int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
|
int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
IM_ASSERT(fmt != NULL);
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
int w = vsnprintf(buf, buf_size, fmt, args);
|
int w = vsnprintf(buf, buf_size, fmt, args);
|
||||||
@ -1279,7 +1278,6 @@ int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
|
|||||||
|
|
||||||
int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
|
int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
|
||||||
{
|
{
|
||||||
IM_ASSERT(fmt != NULL);
|
|
||||||
int w = vsnprintf(buf, buf_size, fmt, args);
|
int w = vsnprintf(buf, buf_size, fmt, args);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return w;
|
return w;
|
||||||
|
Loading…
Reference in New Issue
Block a user