diff options
Diffstat (limited to 'Src/prompt.c')
-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 7f964aad5..5e80da172 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -579,7 +579,7 @@ putpromptchar(int doprint, int endchar) arg = 1; else if (arg < 0) arg += arrlen(psvar) + 1; - if (arrlen(psvar) >= arg) + if (arg > 0 && arrlen(psvar) >= arg) stradd(psvar[arg - 1]); break; case 'E': |