Module: wine Branch: master Commit: 44f49d75ec27ba6109d62e090f2c27e45a70e6e8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=44f49d75ec27ba6109d62e090...
Author: Eric Pouech eric.pouech@gmail.com Date: Wed Dec 1 15:30:11 2021 +0100
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
---
programs/winedbg/dbg.y | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index b58875b6c31..612e6a4106d 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -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); }