From e483761a1e8ab058d9155688434c5fa9138f5ae1 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 19 May 2020 14:45:47 +0200 Subject: Fix #73926: phpdbg will not accept input on restart execution We are more liberal, and accept Windows line endings (CRLF) as well. --- sapi/phpdbg/phpdbg_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg_cmd.c') diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index b736481089..4845acca9a 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -823,7 +823,7 @@ PHPDBG_API int phpdbg_ask_user_permission(const char *question) { while (1) { phpdbg_consume_stdin_line(buf); - if (buf[1] == '\n' && (buf[0] == 'y' || buf[0] == 'n')) { + if ((buf[1] == '\n' || (buf[1] == '\r' && buf[2] == '\n')) && (buf[0] == 'y' || buf[0] == 'n')) { if (buf[0] == 'y') { return SUCCESS; } -- cgit v1.2.1