Skip to content

Fix client crash and garbled text from using text as ImGui format strings - #84

Merged
kaczy93 merged 1 commit into
kaczy93:masterfrom
DavideRei:fix-imgui-format-strings
Nov 23, 2026
Merged

kaczy93 merged 1 commit into
kaczy93:masterfrom
DavideRei:fix-imgui-format-strings

Conversation

@DavideRei

Copy link
Copy Markdown
Contributor

Problem

ImGui.Text, TextColored and SetTooltip take a printf format, but they receive dynamic text: chat messages, set/brush/profile names, tiledata names, status messages. A % in that text is garbled ("100% done") and some sequences crash the client. For chat, the text comes from other users.

Fix

  • Use ImGui.TextUnformatted for dynamic text.
  • Add ImGuiEx.EscapeFormat for TextColored and for ImGuiEx.Tooltip, which have no unformatted variant.

Calls that only show numbers, enums or fixed strings are unchanged.

Testing

  • Reproduced the crash with the Chat window code in a headless ImGui context, and checked that the text is now displayed as typed.
  • Builds on current master. The changes were tested in the app on a fork based on current master.

🤖 Generated with Claude Code

Labels, names and messages were used as format strings: '%' was garbled
and could crash the client.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kaczy93
kaczy93 merged commit 2482425 into kaczy93:master Nov 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants