]> granicus.if.org Git - php/commitdiff
Do never clean stdin buffer away
authorBob Weinand <bobwei9@hotmail.com>
Sat, 18 Jul 2015 21:36:37 +0000 (23:36 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Mon, 20 Jul 2015 16:00:42 +0000 (18:00 +0200)
sapi/phpdbg/phpdbg.c

index ffd0fa5bd144b5923e3c468793c0e2c077ed01a4..c0f5253c00c8ddcadeaa3766c2b81269ce1f2319 100644 (file)
@@ -711,6 +711,8 @@ static int php_sapi_phpdbg_deactivate(void) /* {{{ */
                pg->prompt[1] = PHPDBG_G(prompt)[1];
                memcpy(pg->colors, PHPDBG_G(colors), sizeof(pg->colors));
                pg->eol = PHPDBG_G(eol);
+               pg->input_buflen = PHPDBG_G(input_buflen);
+               memcpy(pg->input_buffer, PHPDBG_G(input_buffer), pg->input_buflen);
                pg->flags = PHPDBG_G(flags) & PHPDBG_PRESERVE_FLAGS_MASK;
        }