Closed TwoQuantumBits closed 1 year ago
With the maidata file triggers the bug is ",&first=1.32" written in 1.32 or 1,32? want determine if this problem trigger by maidata in different format or the Android itself
Should fixed in new version. Thanks!
Describe the bug AstroDX incorrectly parses the
&first=
value if the decimal point used in the value is different from the decimal point of the device's localeReproduction Steps to reproduce the behavior:
&first=
attribute&first=
attribute&first=1.32
then switch device locale to Vietnamese (Vietnam), which uses comma,
as decimal point instead of dot.
Expected behavior The chart is offset correctly (in the above example, it will be offset by 1.32s).
Actual behavior The chart is offset incorrectly (in the above example, it will be offset by 132s instead).
Device specs
Additional context It appears that instead of throwing an error when the incorrect decimal point is detected, the parser just removes the invalid (decimal point) character from the value string before parsing.
Further suggestion Given that most charts nowadays use the dot
.
decimal point for float values, we should make it the standard and make float parsing in the maidata file independent from app and device locale.