diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-03-04 01:35:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-03-04 01:35:10 -0800 |
commit | f3caaf8efd66511eeff194c198e59308c27de54d (patch) | |
tree | 0cb1f2dc360859eed02a1b8f8eae29980fa4ed8e /lisplib.c | |
parent | b111bddfcc737b7f4ab854ce823094bcc8a9de48 (diff) | |
download | txr-f3caaf8efd66511eeff194c198e59308c27de54d.tar.gz txr-f3caaf8efd66511eeff194c198e59308c27de54d.tar.bz2 txr-f3caaf8efd66511eeff194c198e59308c27de54d.zip |
math: defend against locale decimal separator.
The int_flo function also has a sensitivity to locale because
the bignum handling is text-based, involving printing a
floating-point value, and then assuming it contains a period
decimal separator.
* arith.c (int_flo): If CONFIG_LOCALE_TOLERANCE is enabled,
look for dec_point rather than '.' in the formatted number.
When matching and destructuring the number with sscanf,
don't look for the '.' character, but rather a complemented
character set which can maching nothing but the separator,
whatever that is.
Diffstat (limited to 'lisplib.c')
0 files changed, 0 insertions, 0 deletions