mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: crtlib: check for empty buffer in Q_vsnprintf
This commit is contained in:
@@ -339,6 +339,9 @@ int Q_vsnprintf( char *buffer, size_t buffersize, const char *format, va_list ar
|
||||
{
|
||||
int result;
|
||||
|
||||
if( unlikely( buffersize == 0 ))
|
||||
return -1; // report as overflow
|
||||
|
||||
#ifndef _MSC_VER
|
||||
result = vsnprintf( buffer, buffersize, format, args );
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user