-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
I introduced this inadvertently in #47666.
47666 also broke round-tripping of decimal->string.
The bug occurs because of this line:
number.DigitsCount = digEnd - numberOfTrailingZeros;
digEnd is 1 and numberOfTrailingZeros = 2, so we end up with -1. The correct value here should be number.DigitsCount = 1. I'll consider a careful fix for this locally and put a PR up.
Currently, this bug only affects Int.Parse calls with an input that has trailing zeros => 1.0, 1.00, 1.000, 1.0000 etc are broken
Reactions are currently unavailable