1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

arith: Fix variables 'nan' and 'inf' in arithmetic for POSIX mode

The --posix compliance option now disables the case-insensitive
special floating point constants Inf and NaN so that all case
variants of $((inf)) and $((nan)) refer to the variables by those
names as the standard requires. (BUG_ARITHNAN)

src/cmd/ksh93/sh/arith.c: arith():
- Only do case-insensitive checks for "Inf" and "NaN" if the POSIX
  option is off.
This commit is contained in:
Martijn Dekker 2021-11-15 18:49:19 +01:00
parent d9cd49c6d7
commit 56c2e13e92
5 changed files with 39 additions and 6 deletions

6
NEWS
View file

@ -3,6 +3,12 @@ For full details, see the git log at: https://github.com/ksh93/ksh
Any uppercase BUG_* names are modernish shell bug IDs.
2021-11-15:
- In arithmetic evaluation, the --posix compliance option now disables the
special floating point constants Inf and NaN so that $((inf)) and $((nan))
refer to the variables by those names as the standard requires. (BUG_ARITHNAN)
2021-11-14:
- Fixed: ksh crashed after unsetting .sh.match and then matching a pattern.