diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2018-01-14 03:15:49 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2018-01-14 03:15:49 -0800 |
commit | de6a293159a70493bf893dd49fa30cbf14ab7632 (patch) | |
tree | f606050b14922911e6defe9ae2cdc897817fb9fd /Src | |
parent | b476d89fa279469fd24926db7f2b117a318ff38b (diff) | |
download | zsh-de6a293159a70493bf893dd49fa30cbf14ab7632.tar.gz zsh-de6a293159a70493bf893dd49fa30cbf14ab7632.tar.xz zsh-de6a293159a70493bf893dd49fa30cbf14ab7632.zip |
42136: empty string check in %~ / %C prompt expansions
Diffstat (limited to 'Src')
-rw-r--r-- | Src/prompt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/prompt.c b/Src/prompt.c index c478e69fb..63e8093f3 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -315,7 +315,7 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep) case '/': case 'C': /* `/' gives 0, `/any' gives 1, etc. */ - if (*ss++ == '/' && *ss) + if (*ss && *ss++ == '/' && *ss) arg--; for (; *ss; ss++) if (*ss == '/') |