[PATCH] fixed if check before strchr
Marcus Meissner
marcus at jet.franken.de
Tue May 6 13:46:58 CDT 2008
Hi,
spotted by Coverity (CID 701), a if (!spath) should be if (spath).
Ciao, Marcus
---
programs/winedbg/source.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/winedbg/source.c b/programs/winedbg/source.c
index 5519c57..1db7092 100644
--- a/programs/winedbg/source.c
+++ b/programs/winedbg/source.c
@@ -128,7 +128,7 @@ static BOOL source_locate_file(const char* srcfile, char* path)
while (!found)
{
spath = strchr(spath, '\\');
- if (!spath) spath = strchr(spath, '/');
+ if (spath) spath = strchr(spath, '/');
if (!spath) break;
spath++;
found = SearchPathA(dbg_curr_process->search_path, spath, NULL, MAX_PATH, path, NULL);
--
1.5.2.4
More information about the wine-patches
mailing list