From 7a56e9bc84edc4cee86f8ee92d7623bc540e3386 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Fri, 15 Nov 2013 20:52:48 +0000 Subject: [PATCH] fix segfault on some implementations of atoi --- phpdbg_prompt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 38b581e1f9..aef50d851e 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -257,7 +257,7 @@ static PHPDBG_COMMAND(compile) /* {{{ */ static PHPDBG_COMMAND(step) /* {{{ */ { - if (atoi(expr)) { + if (expr && atoi(expr)) { PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; } else { PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; @@ -636,7 +636,7 @@ static PHPDBG_COMMAND(help) /* {{{ */ } /* }}} */ static PHPDBG_COMMAND(quiet) { /* {{{ */ - if (atoi(expr)) { + if (expr && atoi(expr)) { PHPDBG_G(flags) |= PHPDBG_IS_QUIET; } else { PHPDBG_G(flags) &= ~PHPDBG_IS_QUIET; -- 2.50.1