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.
This commit is contained in:
1 parent
c8ba8c1cd0
commit
3c33acf6d7
1 file changed
+3
-1
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user