Fix deleting compose string in IME (flutter/engine#29396)

This commit is contained in:
Greg Spencer 2021-11-01 10:45:59 -07:00 committed by GitHub
parent cafef4382c
commit ba99c3b465

View File

@ -157,7 +157,7 @@ std::optional<std::u16string> TextInputManagerWin32::GetString(int type) const {
const long compose_bytes =
::ImmGetCompositionString(imm_context.get(), type, nullptr, 0);
const long compose_length = compose_bytes / sizeof(wchar_t);
if (compose_length <= 0) {
if (compose_length < 0) {
return std::nullopt;
}