diff options
author | crupest <crupest@outlook.com> | 2020-04-05 22:57:27 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-04-05 22:57:27 +0800 |
commit | e9590859b1aaa1c2bf4714893daf34fbfd4166fd (patch) | |
tree | 09e70624ab55ae641b068b8f9591ad2bfcdaafa8 /src | |
parent | 37ac119b98504ba859dfc789e357718264446bb9 (diff) | |
download | cru-e9590859b1aaa1c2bf4714893daf34fbfd4166fd.tar.gz cru-e9590859b1aaa1c2bf4714893daf34fbfd4166fd.tar.bz2 cru-e9590859b1aaa1c2bf4714893daf34fbfd4166fd.zip |
Fix CI.
Diffstat (limited to 'src')
-rw-r--r-- | src/win/native/input_method.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win/native/input_method.cpp b/src/win/native/input_method.cpp index 9d8b0760..adadf8e2 100644 --- a/src/win/native/input_method.cpp +++ b/src/win/native/input_method.cpp @@ -40,9 +40,9 @@ void WinInputMethodContextRef::Reset() { } std::string WinInputMethodContextRef::GetCompositionText() { - const auto length = + const auto length = gsl::narrow_cast<DWORD>( ::ImmGetCompositionStringW(handle_, GCS_RESULTREADSTR, NULL, 0) + - sizeof(wchar_t); + sizeof(wchar_t)); std::vector<std::byte> data(length); const auto result = ::ImmGetCompositionStringW( handle_, GCS_RESULTREADSTR, static_cast<LPVOID>(data.data()), length); |