aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/common.h b/c/common.h
index 7b7e996..8e850ed 100644
--- a/c/common.h
+++ b/c/common.h
@@ -58,9 +58,9 @@ T* Library::GetProcAddress(const char* const szProc)
}
template<size_t N, typename... T>
-inline auto wszf(wchar_t (&wsz)[N], const wchar_t* wszFmt, T... xs)
+inline int wszf(wchar_t (&wsz)[N], const wchar_t* const wszFmt, T... xs)
{
- return swprintf_s(wsz, N, wszFmt, xs...);
+ return _snwprintf_s(wsz, N, _TRUNCATE, wszFmt, xs...);
}
/* Create and return an object of type C. If construction fails,