Commit f15aa57
Denys Vlasenko
ash: [PARSER] Fix parsing of ${##1}
Upstream commit:
Date: Thu, 4 Oct 2007 22:15:10 +0800
[PARSER] Fix parsing of ${##1}
Previously dash treated ${##1} as a length operation. This patch fixes that.
Test case:
set -- a
echo ${##1}OK
Old result:
1OK
New result:
OK
This was a real bug in ash (but not in hush).
Signed-off-by: Denys Vlasenko <[email protected]>1 parent e19923f commit f15aa57
File tree
5 files changed
+38
-10
lines changed- shell
- ash_test/ash-vars
- hush_test/hush-vars
5 files changed
+38
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11728 | 11728 | | |
11729 | 11729 | | |
11730 | 11730 | | |
11731 | | - | |
11732 | | - | |
11733 | | - | |
11734 | | - | |
11735 | | - | |
11736 | | - | |
11737 | | - | |
11738 | | - | |
11739 | | - | |
| 11731 | + | |
11740 | 11732 | | |
| 11733 | + | |
11741 | 11734 | | |
11742 | 11735 | | |
11743 | 11736 | | |
| |||
11752 | 11745 | | |
11753 | 11746 | | |
11754 | 11747 | | |
11755 | | - | |
| 11748 | + | |
| 11749 | + | |
11756 | 11750 | | |
| 11751 | + | |
| 11752 | + | |
| 11753 | + | |
| 11754 | + | |
| 11755 | + | |
| 11756 | + | |
| 11757 | + | |
| 11758 | + | |
| 11759 | + | |
| 11760 | + | |
| 11761 | + | |
| 11762 | + | |
| 11763 | + | |
| 11764 | + | |
11757 | 11765 | | |
11758 | 11766 | | |
11759 | 11767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments