From 62166f9679f583f1ea6028bfe54a4487ccc57df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 10 Jul 2023 09:34:42 +0200 Subject: lxdrgen-cpp-win32: fix return value handling --- tools/lxdrgen-cpp-win32.cpp | 4 ++-- 1 file 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); } -- cgit v1.2.3