Windows flac_snprintf tweaks.

Patch from Janne Hyvärinen <cse@sci.fi>.
This commit is contained in:
Erik de Castro Lopo
2013-03-17 22:05:58 +11:00
parent 5a14742dad
commit 74aac94cda
3 changed files with 8 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ flac_snprintf(char *str, size_t size, const char *fmt, ...)
va_start (va, fmt);
#ifdef _MSC_VER
rc = vsnprintf_s (str, size, fmt, va);
rc = vsnprintf_s (str, size, _TRUNCATE, fmt, va);
rc = (rc > 0) ? rc : (size == 0 ? 1024 : size * 2);
#else
rc = vsnprintf (str, size, fmt, va);