From f44962c01a0e5f5fdf9652cb28e775838fe0dbbc Mon Sep 17 00:00:00 2001 From: Espyo Date: Wed, 20 May 2020 16:48:21 +0100 Subject: [PATCH] Backends: Allegro: Don't call AddInputCharacter if the pressed key has no character. (#3252) --- examples/imgui_impl_allegro5.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/imgui_impl_allegro5.cpp b/examples/imgui_impl_allegro5.cpp index 76f74a3fa..2c7df9a92 100644 --- a/examples/imgui_impl_allegro5.cpp +++ b/examples/imgui_impl_allegro5.cpp @@ -357,7 +357,8 @@ bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT *ev) return true; case ALLEGRO_EVENT_KEY_CHAR: if (ev->keyboard.display == g_Display) - io.AddInputCharacter((unsigned int)ev->keyboard.unichar); + if (ev->keyboard.unichar != 0) + io.AddInputCharacter((unsigned int)ev->keyboard.unichar); return true; case ALLEGRO_EVENT_KEY_DOWN: case ALLEGRO_EVENT_KEY_UP: