aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-31 00:13:18 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-31 00:13:18 +0200
commit8b9fbccf2090f121a492a1c83378ab033c6f0ea2 (patch)
tree7b004988153f99317deab3701be552ebe550c471 /c
parent019fad8bdbda5599e5f19bc50cd8ebac6be899e4 (diff)
downloadEpisodeBrowser-8b9fbccf2090f121a492a1c83378ab033c6f0ea2.tar.gz
Use _snwprintf_s instead of swprintf_s for wszf.
Diffstat (limited to 'c')
-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,