[PATCH 06/13] programs/winedbg: don't repeat last command (from empty input) when parsing a file
Eric Pouech
eric.pouech at gmail.com
Wed Dec 1 08:30:11 CST 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
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);
}
More information about the wine-devel
mailing list