diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-07-10 09:34:42 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-07-10 09:34:42 +0200 |
commit | 62166f9679f583f1ea6028bfe54a4487ccc57df0 (patch) | |
tree | ea29e3a8a4f806b8832c329f254ee821b9abef08 /tools | |
parent | 2edc9c6fd10e34ca1da0d25d3ceb9b67a6b9c73c (diff) | |
download | liberty-62166f9679f583f1ea6028bfe54a4487ccc57df0.tar.gz liberty-62166f9679f583f1ea6028bfe54a4487ccc57df0.tar.xz liberty-62166f9679f583f1ea6028bfe54a4487ccc57df0.zip |
lxdrgen-cpp-win32: fix return value handling
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lxdrgen-cpp-win32.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lxdrgen-cpp-win32.cpp b/tools/lxdrgen-cpp-win32.cpp index 778a988..7a49503 100644 --- a/tools/lxdrgen-cpp-win32.cpp +++ b/tools/lxdrgen-cpp-win32.cpp @@ -23,7 +23,7 @@ bool utf8_to_wstring(const uint8_t *utf8, size_t length, std::wstring &wide) { return false; wide.resize(size); - return !MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, + return !!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, (LPCCH) utf8, length, wide.data(), size); } @@ -40,7 +40,7 @@ bool wstring_to_utf8(const std::wstring &wide, std::string &utf8) { return false; utf8.resize(size); - return !WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, + return !!WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, (LPCWCH) wide.data(), wide.size(), utf8.data(), size, NULL, NULL); } |