summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 771fc8b..4ca4c6c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -7073,6 +7073,11 @@ subevalvar(char *start, char *str, int strloc,
repl = NULL;
break;
}
+ /* Skip over quoted 'str'. Example: ${var/'/'} - second / is not a separator */
+ if ((unsigned char)*repl == CTLQUOTEMARK) {
+ while ((unsigned char)*++repl != CTLQUOTEMARK)
+ continue;
+ }
if (*repl == '/') {
*repl = '\0';
break;