Use _wfopen() instead of _wfopen_s to stay compatible with Win XP.

I've used _wfopen_s() because it's newer and the older variants are said
to throw warning when build with MSVC. But apparently Windows XP hasn't
got that symbol... So just use the normal _wfopen(), MSVC is unsupported
anyways. The may or may not enough to restore Win XP compatibility.
This commit is contained in:
Yamagi Burmeister 2018-06-25 08:16:09 +02:00
parent 1f4e90e0d3
commit 091e1834eb

View file

@ -1161,11 +1161,7 @@ FILE *Q_fopen(const char *file, const char *mode)
{
if (MultiByteToWideChar(CP_UTF8, 0, mode, -1, wmode, 16) > 0)
{
FILE *ret;
if(_wfopen_s(&ret, wfile, wmode) == 0)
{
return ret;
}
return _wfopen(wfile, wmode);
}
}