mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added VS2008 compatibility (vsnprintf_s uses 4 args by C11 standard, which is supported in VS2010 but not VS2008)
This commit is contained in:
+5
-1
@@ -46,7 +46,11 @@ void dlog_f(const char *fmt, int type, ...) {
|
||||
va_list args;
|
||||
va_start(args, type);
|
||||
char buf[4096];
|
||||
vsnprintf_s(buf, sizeof buf, fmt, args);
|
||||
#if (_MSC_VER < 1600)
|
||||
vsnprintf_s(buf, sizeof buf, _TRUNCATE, fmt, args);
|
||||
#else
|
||||
vsnprintf_s(buf, sizeof buf, fmt, args); // C11 standard
|
||||
#endif
|
||||
Log << buf;
|
||||
Log.flush();
|
||||
va_end(args);
|
||||
|
||||
Reference in New Issue
Block a user