aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-02-29 14:43:05 +0100
committerJay Berkenbilt <ejb@ql.org>2020-02-29 14:43:33 +0100
commitbb6768b8f0e3b676b3e82e7f46475df5ad1855b8 (patch)
tree34c1fc4699cafe393e62f9904646404d776bc442 /libqpdf/QUtil.cc
parent154b65f2e9db31d1594501011b25762f8c0a2a0e (diff)
downloadqpdf-bb6768b8f0e3b676b3e82e7f46475df5ad1855b8.tar.zst
Include header for wcslen (fixes #405)
Diffstat (limited to 'libqpdf/QUtil.cc')
-rw-r--r--libqpdf/QUtil.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index 1d29bccf..5c4bdeed 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -24,6 +24,7 @@
#include <string.h>
#include <fcntl.h>
#include <memory>
+#include <cwchar>
#ifdef _WIN32
#include <windows.h>
#include <direct.h>
@@ -2375,7 +2376,7 @@ QUtil::call_main_from_wmain(int argc, wchar_t* argv[], std::function<int(int, ch
for (int i = 0; i < argc; ++i)
{
std::string utf16;
- for (size_t j = 0; j < wcslen(argv[i]); ++j)
+ for (size_t j = 0; j < std::wcslen(argv[i]); ++j)
{
unsigned short codepoint = static_cast<unsigned short>(argv[i][j]);
utf16.append(1, static_cast<char>(