Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arith.c: fix: cmd with radix point error not recorded in history
Reproducer on interactive shell: $ LC_NUMERIC=nl_NL $ ((x=1.2)) -ksh: 1.2: radix point '.' requires LC_NUMERIC=C $ ▂ ← arrow up: ((x=1.2)) not retrieved from history The errormsg() call on arith.c:463 prevented the command from being entered into the command history. This problem is similar to the one fixed in 9348ceb. A partial call stack to this errormsg() call is: arith.c:463 arith() streval.c:857 expr() calls arith() via *vp->convert streval.c:673 expr() calls expr() streval.c:906 arith_compile() calls expr() Error messages are handled in streval.c:906 by checking if cur.errmsg.value is set; errmsg is a struct lvalue. Error messages can be passed from arith() via the lvalue pointer; arith_compile() then does proper error message handling. src/cmd/ksh93/sh/arith.c: arith(): - Pass the error message back to arith_compile() via lvalue->value.
- Loading branch information