From 977c766e2337fea238804b8d8b97659361391ed0 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 24 Sep 2018 00:16:53 +0800 Subject: Develop basic function of textbox. --- CruUI/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CruUI/base.cpp') diff --git a/CruUI/base.cpp b/CruUI/base.cpp index c6b57e33..f5868170 100644 --- a/CruUI/base.cpp +++ b/CruUI/base.cpp @@ -13,7 +13,7 @@ namespace cru const auto length = ::WideCharToMultiByte(CP_UTF8, 0, string.data(), -1, nullptr, 0, nullptr, nullptr); MultiByteString result; result.reserve(length); - if (::WideCharToMultiByte(CP_UTF8, 0, string.data(), -1, result.data(), result.capacity(), nullptr, nullptr) == 0) + if (::WideCharToMultiByte(CP_UTF8, 0, string.data(), -1, result.data(), static_cast(result.capacity()), nullptr, nullptr) == 0) throw Win32Error(::GetLastError(), "Failed to convert wide string to UTF-8."); return result; } -- cgit v1.2.3