You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of this bug is that floats parsed that fit this condition (ex: 12.02, -325.0021) will return without the digits following the first 0, and those remaining digits will be left on input causing a parsing error.
Suggested solution:
Create a separate function to be called after the decimal which does not perform this first-digit zero-check.
The text was updated successfully, but these errors were encountered:
Issue
The function normalFloat(_ input: inout Substring) does not correctly parse floats. After parsing the decimal, it calls decIntTextUTF8(_ utf8: inout Substring.UTF8View) again. This function checks to make sure the first digit is not zero. However, with the fractional component of floats this is allowed.
The result of this bug is that floats parsed that fit this condition (ex:
12.02
,-325.0021
) will return without the digits following the first 0, and those remaining digits will be left oninput
causing a parsing error.Suggested solution:
Create a separate function to be called after the decimal which does not perform this first-digit zero-check.
The text was updated successfully, but these errors were encountered: