瀏覽代碼

Demo: Console: Fixed a completion bug when multiple candidates are equals and match until the end.

omar 8 年之前
父節點
當前提交
714beb217c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      imgui_demo.cpp

+ 1 - 1
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;