You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If vsnprintf interprets the string passed to SetTooltip as a format string, it looks at va_list args which will always be empty. The result is the next pointer being formatted into the string.
ImGui.NET should allow for passing additional args to SetTooltip to allow the arg to actually be used as a format string.
The text was updated successfully, but these errors were encountered:
I did just realize that a workaround is to escape the % with an additional % like this: var str = $"{value:p1}% - {label}";
shayded-exe
changed the title
Passing a string with a % to Text() causes garbage data to be printed
Passing a string with a % to SetTooltip() causes garbage data to be printed
Nov 1, 2023
Not a big deal since it can easily be worked around, but it would be nice if this issue had higher visibility so future people like me don't spend a couple hours in confusion :)
Maybe I could do a PR to start adding a "known gotchas" section to the docs to highlight oddities like this.
ImFormatStringV
If
vsnprintf
interprets the string passed toSetTooltip
as a format string, it looks atva_list args
which will always be empty. The result is the next pointer being formatted into the string.ImGui.NET should allow for passing additional args to
SetTooltip
to allow the arg to actually be used as a format string.The text was updated successfully, but these errors were encountered: