-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spurious syntax error when using ${foo[${bar}..${baz}]} (ksh93#436)
Attempting to use array subscript expansion with variables that aren't set currently causes a spurious syntax error (in ksh93u+ and older commits the reproducer crashes): $ ksh -c 'echo ${foo[${bar}..${baz}]}' # Shouldn't print anything ksh: : arithmetic syntax error src/cmd/ksh93/sh/macro.c: - Backport a parser bugfix from ksh93v- 2012-08-24 that avoids setting mp->dotdot until the copyto() function's loop is finished. src/cmd/ksh93/tests/arrays.sh: - Add regression tests for this bug.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters