From: Felipe Pena Date: Sat, 16 Nov 2013 11:50:25 +0000 (-0200) Subject: - Fixed repeat-last-command feature for next and until command X-Git-Tag: php-5.6.0alpha1~110^2~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=515f7806c55f0005c441703f1f65f5e7746782d9;p=php - Fixed repeat-last-command feature for next and until command --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 89d5aef573..8c9b4d52b0 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -692,10 +692,10 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, char *cmd_line, size_t cmd_le PHPDBG_G(last_params) = expr; PHPDBG_G(last_params_len) = (cmd_len - expr_len) ? (((cmd_len - expr_len) - sizeof(" "))+1) : 0; - + phpdbg_debug("phpdbg_do_cmd(%s, \"%s\", %lu)", command->name, PHPDBG_G(last_params), PHPDBG_G(last_params_len)); - + return command->handler( PHPDBG_G(last_params), PHPDBG_G(last_params_len) TSRMLS_CC); } @@ -721,11 +721,8 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ char *cmd = NULL; while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { - cmd = readline(PROMPT); - - if (cmd) { - cmd_len = strlen(cmd); - } else cmd_len = 0L; + cmd = readline(PROMPT); + cmd_len = cmd ? strlen(cmd) : 0; #endif /* trim space from end of input */ @@ -769,7 +766,7 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ } #endif } else if (PHPDBG_G(last)) { - PHPDBG_G(last)->handler( + return PHPDBG_G(last)->handler( PHPDBG_G(last_params), PHPDBG_G(last_params_len) TSRMLS_CC); } }