Closed Degot closed 1 year ago
Thanks for bringing this to my attention. Good catch. I decided upon using TrimStart instead. This should be fixed now. I added some tests to the test project to using your example string to parse to ensure correctness and prevent against behavior regression.
Pull the latest changes from the main branch and test it out, if you like. If you are satisfied with the fix, you can close this issue. Or do nothing; If I don't hear anything from after about a week, I will close the ticket on your behalf.
I've tested fix. It works as expected. Thank you.
Bug:
input = input.Replace(numberFormatProvider.NegativeSign, String.Empty);
if input starts with NegativeSign, it will replace ALL NegativeSigns in the string.
To Fix:
input = input.Substring(1);
To Test:new BigDecimal("-123.123E-20");