Commit bb6768b8f0e3b676b3e82e7f46475df5ad1855b8

Authored by Jay Berkenbilt
1 parent 154b65f2

Include header for wcslen (fixes #405)

Showing 1 changed file with 2 additions and 1 deletions
libqpdf/QUtil.cc
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 #include <string.h> 24 #include <string.h>
25 #include <fcntl.h> 25 #include <fcntl.h>
26 #include <memory> 26 #include <memory>
  27 +#include <cwchar>
27 #ifdef _WIN32 28 #ifdef _WIN32
28 #include <windows.h> 29 #include <windows.h>
29 #include <direct.h> 30 #include <direct.h>
@@ -2375,7 +2376,7 @@ QUtil::call_main_from_wmain(int argc, wchar_t* argv[], std::function&lt;int(int, ch @@ -2375,7 +2376,7 @@ QUtil::call_main_from_wmain(int argc, wchar_t* argv[], std::function&lt;int(int, ch
2375 for (int i = 0; i < argc; ++i) 2376 for (int i = 0; i < argc; ++i)
2376 { 2377 {
2377 std::string utf16; 2378 std::string utf16;
2378 - for (size_t j = 0; j < wcslen(argv[i]); ++j) 2379 + for (size_t j = 0; j < std::wcslen(argv[i]); ++j)
2379 { 2380 {
2380 unsigned short codepoint = static_cast<unsigned short>(argv[i][j]); 2381 unsigned short codepoint = static_cast<unsigned short>(argv[i][j]);
2381 utf16.append(1, static_cast<char>( 2382 utf16.append(1, static_cast<char>(