Skip to content

v1.2.1 - Number Formatting Bugfix

Choose a tag to compare

@groundbreakingmc groundbreakingmc released this 13 Jan 08:30
· 12 commits to master since this release

πŸ› Bug Fixes

Fixed a critical visual bug in balance display where suffixed numbers were calculated incorrectly due to char arithmetic in string concatenation.

What was broken

  • Balance of 1341 displayed as "50K" instead of "1.3K"
  • Any balance between 1000-9999 with decimals showed wrong values
  • Root cause: DECIMAL_SEPARATOR char (ASCII 46) was treated as number during concatenation: 1 + '.' + 3 = 50

What's fixed

  • Proper string concatenation now enforced in NumberFormatters.formatWithSuffix()
  • All suffixed balances now display correctly

Technical details

Changed concatenation from implicit char-to-int conversion to explicit string building by prepending empty string.


Commit with fix: 5f5cff9