From 4f389b7f6ab54a884730b09050d76a9964bee812 Mon Sep 17 00:00:00 2001 From: Max Thrun Date: Thu, 18 Aug 2016 11:00:23 -0700 Subject: [PATCH] Add null terminator to ShowStyleEditor output_type combo options Without a null terminator the Combo() function indexes outside of the "items_separated_by_zeros" string. --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 67846e7a..0d9dbbcf 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1670,7 +1670,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) } ImGui::LogFinish(); } - ImGui::SameLine(); ImGui::PushItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY"); ImGui::PopItemWidth(); + ImGui::SameLine(); ImGui::PushItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY\0"); ImGui::PopItemWidth(); ImGui::SameLine(); ImGui::Checkbox("Only Modified Fields", &output_only_modified); static ImGuiColorEditMode edit_mode = ImGuiColorEditMode_RGB;