Repository navigation
Commit abb3240
committed
Drop the Debug.Assert that rejects decimals like 10.0m [patch]
ParseRenderedFloat trims trailing zeros from the rendered text, so a decimal
with more than one integer digit and only zeros after the point, such as
10.0m, 100.00m or -20.0m, becomes "10." with an empty fraction. The assert
after the loop required an empty fraction to come with a single integer
digit, which the loop does not guarantee, so Debug builds ended the process
with "Unexpected format: 10." on valid input. Release builds compiled the
assert out and returned the right value. The code after the assert already
handles an empty fraction, so the assert goes.
Fixes #112
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QK96a24CjVhUK9u1Ss2YNN1 parent 299fd76 commit abb3240
2 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
87 | 99 | | |
88 | 100 | | |
89 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
671 | | - | |
672 | 670 | | |
673 | 671 | | |
674 | 672 | | |
| |||
0 commit comments