From 3c33acf6d73d431913d3f5ac820d34818dd1611f Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Wed, 13 May 2026 08:08:52 +0200 Subject: [PATCH] fix(util): pin operator precedence in DrawArrows IconButton id `id + 1.ToString()` resolves as `id.ToString() + "1"`, producing "01" instead of "1" for the ArrowRight button. The single live caller (DbViewer page navigation) still produced unique IDs by accident, but the semantics were wrong. Explicit parentheses fix it. --- HellionChat/Util/ImGuiUtil.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HellionChat/Util/ImGuiUtil.cs b/HellionChat/Util/ImGuiUtil.cs index 4db4141..cc5187a 100755 --- a/HellionChat/Util/ImGuiUtil.cs +++ b/HellionChat/Util/ImGuiUtil.cs @@ -583,7 +583,9 @@ internal static class ImGuiUtil using (ImRaii.Disabled(isMax)) { - if (IconButton(FontAwesomeIcon.ArrowRight, id + 1.ToString())) + // Parentheses pin the operator precedence: without them this resolves as + // id.ToString() + "1" (e.g. "01" instead of "1"). + if (IconButton(FontAwesomeIcon.ArrowRight, (id + 1).ToString())) selected++; }