Juan Lang : winedbg: Fix a crash on initial empty input.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Jun 3 05:24:49 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: a866fa37e9d3c3c731215891c5b678a74bd21145
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a866fa37e9d3c3c731215891c5b678a74bd21145
Author: Juan Lang <juan_lang at yahoo.com>
Date: Fri Jun 2 18:07:42 2006 -0700
winedbg: Fix a crash on initial empty input.
---
programs/winedbg/debug.l | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l
index 5d78eda..a3df742 100644
--- a/programs/winedbg/debug.l
+++ b/programs/winedbg/debug.l
@@ -47,7 +47,7 @@ static size_t last_line_idx = 0;
/* FIXME: should have a pair of buffers, and switch between the two, instead of
* reallocating a new one for each line
*/
- if (len == 0 || (len == 1 && tmp[0] == '\n') || (len == 2 && tmp[0] == '\r' && tmp[1] == '\n'))
+ if (last_line && (len == 0 || (len == 1 && tmp[0] == '\n') || (len == 2 && tmp[0] == '\r' && tmp[1] == '\n')))
{
HeapFree(GetProcessHeap(), 0, tmp);
}
More information about the wine-cvs
mailing list