Skip to content

Commit 75836f4

Browse files
authored
DPL GUI: avoid misbehavior when % is passed in string (#3905)
Render it unformatted in case that's the case.
1 parent d16838a commit 75836f4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Framework/Core/src/FrameworkGUIDebugger.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ void displayHistory(const DeviceInfo& info, DeviceControl& control)
145145
// stream, a second time at display time, to avoid
146146
// showing unrelevant messages from past.
147147
if (logLevel >= control.logLevel) {
148-
ImGui::TextColored(color, line.c_str(), line.c_str() + line.size());
148+
if (line.find('%', 0) == std::string::npos) {
149+
ImGui::TextUnformatted(line.c_str(), line.c_str() + line.size());
150+
} else {
151+
ImGui::TextColored(color, line.c_str(), line.c_str() + line.size());
152+
}
149153
}
150154
}
151155
ji = (ji + 1) % historySize;

0 commit comments

Comments
 (0)