1
0
mirror of synced 2024-11-28 09:30:51 +01:00

fix: Format string vulnerability

This commit is contained in:
WerWolv 2023-11-05 21:51:49 +01:00
parent 713ce86e24
commit d1f8053fbb

View File

@ -283,7 +283,7 @@ namespace hex::plugin::builtin {
// Draw the line with the bold text highlighted
ImGui::TextUnformatted(line.substr(0, boldStart).c_str());
ImGui::SameLine(0, 0);
ImGui::TextColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_Highlight), line.substr(boldStart + 2, boldEnd - boldStart - 2).c_str());
ImGui::TextFormattedColored(ImGui::GetCustomColorVec4(ImGuiCustomCol_Highlight), "{}", line.substr(boldStart + 2, boldEnd - boldStart - 2).c_str());
ImGui::SameLine(0, 0);
ImGui::TextUnformatted(line.substr(boldEnd + 2).c_str());
} else {