From 1ab45b4ccecda8237cf056dfc16a6e8260a0f669 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Wed, 20 Nov 2013 14:40:08 +0000 Subject: [PATCH] fix broken sub command error --- phpdbg_cmd.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index 90d8c1e579..f14004fd62 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -329,15 +329,18 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, const phpdbg_input_t *input T phpdbg_debug( "trying sub commands in \"%s\" for \"%s\" with %d arguments", command->name, sub.argv[0]->string, sub.argc-1); - return phpdbg_do_cmd(command->subs, &sub TSRMLS_CC); - } else { - phpdbg_parse_param( - input->argv[1]->string, - input->argv[1]->length, - ¶m TSRMLS_CC); + if (phpdbg_do_cmd(command->subs, &sub TSRMLS_CC) == SUCCESS) { + return SUCCESS; + } } + + /* pass parameter on */ + phpdbg_parse_param( + input->argv[1]->string, + input->argv[1]->length, + ¶m TSRMLS_CC); } - + phpdbg_debug( "found command %s for %s with %d arguments", command->name, input->argv[0]->string, input->argc-1); @@ -367,7 +370,8 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, const phpdbg_input_t *input T phpdbg_error( "No function executed !!"); } - + +out: return rc; } /* }}} */ -- 2.50.1