winedbg: Don't repeat last command (from empty input) when parsing a file.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-12-01 15:30:11 +01:00 committed by Alexandre Julliard
parent 956a978801
commit 44f49d75ec
1 changed files with 3 additions and 4 deletions

View File

@ -524,10 +524,9 @@ size_t input_lex_read_buffer(char* buf, int size)
len--;
}
/* FIXME: should have a pair of buffers, and switch between the two, instead of
* reallocating a new one for each line
*/
if (dbg_parser.last_line && (len == 0 || (len == 1 && tmp[0] == '\n')))
/* recall last command when empty input buffer and not parsing a file */
if (dbg_parser.last_line && (len == 0 || (len == 1 && tmp[0] == '\n')) &&
dbg_parser.output != INVALID_HANDLE_VALUE)
{
HeapFree(GetProcessHeap(), 0, tmp);
}