diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-05-19 14:45:47 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-05-26 17:44:39 +0200 |
commit | e483761a1e8ab058d9155688434c5fa9138f5ae1 (patch) | |
tree | 40b81574c0481816651858764e10381c9883b377 /sapi/phpdbg | |
parent | 879004dae325e50d3e1a8f9477e66cdfeef0d366 (diff) | |
download | php-git-e483761a1e8ab058d9155688434c5fa9138f5ae1.tar.gz |
Fix #73926: phpdbg will not accept input on restart execution
We are more liberal, and accept Windows line endings (CRLF) as well.
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |