Fix Q_vsnprintf for mingw-w64

By default mingw-w64 uses Microsoft's broken _vsnprintf() in msvcrt.dll.
It can be overriden by defining __USE_MINGW_ANSI_STDIO but let's just
use the same behavior for both MSVC and mingw-w64.

Reported by @birdstakes.
This commit is contained in:
Zack Middleton 2018-02-04 08:03:51 -06:00
parent ad10e6610c
commit 83119a990a
2 changed files with 8 additions and 5 deletions

View file

@ -746,13 +746,14 @@ qboolean Q_isintegral( float f )
return (int)f == f;
}
#ifdef _MSC_VER
#ifdef _WIN32
/*
=============
Q_vsnprintf
Special wrapper function for Microsoft's broken _vsnprintf() function.
MinGW comes with its own snprintf() which is not broken.
MinGW comes with its own vsnprintf() which is not broken. mingw-w64
however, uses Microsoft's broken _vsnprintf() function.
=============
*/