Commit e59223c
committed
read: fix stripping of final IFS delimiters with SHOPT_MUlTIBYTE=0
The previous commit has a regression test failure when
SHOPT_MULTIBYTE is turned off in SHOPT.sh:
builtins.sh[1775]: FAIL: issue 926 r7 (expected $'end:
<one\ntwo\nthXree\nX>', got $'end: <one\ntwo\nthXree\n>')
read.c lines 543-568 contains a perforamnce optimisation that is
only used when SHOPT_MULTIBYTE is turned off at compile time. This
code had a bug where *all* final $IFS delimiters were stripped from
a field though only whitespace delimiters should be stripped. This
commit fixes that bug by adding an isspace(3) check for that.
Resolves: #926 (again)1 parent ad27275 commit e59223c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
0 commit comments