about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2018-01-14 03:15:49 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2018-01-14 03:15:49 -0800
commitde6a293159a70493bf893dd49fa30cbf14ab7632 (patch)
treef606050b14922911e6defe9ae2cdc897817fb9fd /Src
parentb476d89fa279469fd24926db7f2b117a318ff38b (diff)
downloadzsh-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.c2
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 == '/')