From 714beb217cc12b27fe42ae6c5539f1488aa66d45 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 7 Jan 2017 20:18:45 +0100 Subject: [PATCH] Demo: Console: Fixed a completion bug when multiple candidates are equals and match until the end. --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index e9b5da514..dda0a53db 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -2316,7 +2316,7 @@ struct ExampleAppConsole for (int i = 0; i < candidates.Size && all_candidates_matches; i++) if (i == 0) c = toupper(candidates[i][match_len]); - else if (c != toupper(candidates[i][match_len])) + else if (c == 0 || c != toupper(candidates[i][match_len])) all_candidates_matches = false; if (!all_candidates_matches) break;