Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ext/readline/readline_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static zend_string *cli_get_prompt(char *block, char prompt) /* {{{ */
char *prompt_spec = CLIR_G(prompt) ? CLIR_G(prompt) : DEFAULT_PROMPT;
bool unicode_warned = false;

do {
while (*prompt_spec) {
if (*prompt_spec == '\\') {
switch (prompt_spec[1]) {
case '\\':
Expand Down Expand Up @@ -198,8 +198,12 @@ static zend_string *cli_get_prompt(char *block, char prompt) /* {{{ */
smart_str_appendc(&retval, '?');
}
}
} while (++prompt_spec && *prompt_spec);
++prompt_spec;
}
smart_str_0(&retval);
if (!retval.s) {
return ZSTR_EMPTY_ALLOC();
}
return retval.s;
}
/* }}} */
Expand Down
Loading