diff --git a/engine/src/flutter/shell/platform/windows/text_input_manager_win32.cc b/engine/src/flutter/shell/platform/windows/text_input_manager_win32.cc index 3d27e26be19..e3900c1b511 100644 --- a/engine/src/flutter/shell/platform/windows/text_input_manager_win32.cc +++ b/engine/src/flutter/shell/platform/windows/text_input_manager_win32.cc @@ -157,7 +157,7 @@ std::optional 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; }