From 209d33ca5791243f7968390b0417d8eb24378811 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 24 Feb 2021 21:24:43 +0100 Subject: [PATCH] ui: Fixed bookmark name and comment not accepting changes --- source/views/view_bookmarks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/views/view_bookmarks.cpp b/source/views/view_bookmarks.cpp index b1f3f7e42..79262bafd 100644 --- a/source/views/view_bookmarks.cpp +++ b/source/views/view_bookmarks.cpp @@ -87,7 +87,7 @@ namespace hex { bytesString += "..."; } - ImGui::TextColored(ImColor(0xFF9BC64D), bytesString.c_str()); + ImGui::TextColored(ImColor(0xFF9BC64D), "%s", bytesString.c_str()); } if (ImGui::Button("hex.view.bookmarks.button.jump"_lang)) View::postEvent(Events::SelectionChangeRequest, region); @@ -99,14 +99,14 @@ namespace hex { ImGui::NewLine(); ImGui::TextUnformatted("hex.view.bookmarks.header.name"_lang); ImGui::Separator(); - ImGui::InputText("##nameInput", std::string(name.data()).data(), 64); + ImGui::InputText("##nameInput", name.data(), 64); ImGui::SameLine(); ImGui::ColorEdit4("hex.view.bookmarks.header.color"_lang, (float*)&headerColor.Value, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_NoAlpha); color = headerColor; ImGui::NewLine(); ImGui::TextUnformatted("hex.view.bookmarks.header.comment"_lang); ImGui::Separator(); - ImGui::InputTextMultiline("##colorInput", std::string(comment.data()).data(), 0xF'FFFF); + ImGui::InputTextMultiline("##colorInput", comment.data(), 0xF'FFFF); ImGui::NewLine(); }