com php-src: ...: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Wed, 13 Nov 2013 02:39:02 +0000 |
| Subject: | com php-src: ...: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75038@lists.php.net to get a copy of this message | ||
Commit: 94e887cf2a9516970bc340630cec4f334f376150
Author: krakjoe <joe.watkins@live.co.uk> Wed, 13 Nov 2013 02:39:02 +0000
Parents: efee212045fa151886613d1b11cd4d2c6e74441c
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=94e887cf2a9516970bc340630cec4f334f376150
Log:
..
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index d2cd8be..c3653d0 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt..c
@@ -207,9 +207,9 @@ static PHPDBG_COMMAND(back) /* {{{ */
static PHPDBG_COMMAND(print) /* {{{ */
{
- if (expr_len > 0L) {
+ if (expr && expr_len > 0L) {
if (phpdbg_do_cmd(phpdbg_print_commands, (char*)expr, expr_len TSRMLS_CC) == FAILURE) {
- phpdbg_error("Failed to find print command: %s/%u", expr, expr_len);
+ phpdbg_error("Failed to find print command %s", expr);
}
return SUCCESS;
}
@@ -527,7 +527,8 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, char *cmd_line, size_t cmd_le
PHPDBG_G(last) = (phpdbg_command_t*) command;
PHPDBG_G(last_params) = expr;
- PHPDBG_G(last_params_len) = ((cmd_len - expr_len) - sizeof(" "))+1;
+ PHPDBG_G(last_params_len) = (cmd_len - expr_len) ?
+ (((cmd_len - expr_len) - sizeof(" "))+1) : 0;
return command->handler(
PHPDBG_G(last_params), PHPDBG_G(last_params_len) TSRMLS_CC);