diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-02-29 14:43:05 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2020-02-29 14:43:33 +0100 |
commit | bb6768b8f0e3b676b3e82e7f46475df5ad1855b8 (patch) | |
tree | 34c1fc4699cafe393e62f9904646404d776bc442 | |
parent | 154b65f2e9db31d1594501011b25762f8c0a2a0e (diff) | |
download | qpdf-bb6768b8f0e3b676b3e82e7f46475df5ad1855b8.tar.zst |
Include header for wcslen (fixes #405)
-rw-r--r-- | libqpdf/QUtil.cc | 3 |
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>( |