From: Eric Pouech eric.pouech@gmail.com
Note: it's anyway wrong to search source files inside modules' path (a proper fix will require revisiting source file handling). This fix will actually be sufficient when running wine from within its build tree.
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- programs/winedbg/source.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/programs/winedbg/source.c b/programs/winedbg/source.c index 044eccaab5e..74f31d986c6 100644 --- a/programs/winedbg/source.c +++ b/programs/winedbg/source.c @@ -122,17 +122,18 @@ static BOOL source_locate_file(const char* srcfile, char* path) strcpy(path, srcfile); found = TRUE; } - else if (dbg_curr_process->search_path) + else { const char* spath; - + const char* sp = dbg_curr_process->search_path; + if (!sp) sp = "."; spath = srcfile; while (!found) { while (*spath && *spath != '/' && *spath != '\') spath++; if (!*spath) break; spath++; - found = SearchPathA(dbg_curr_process->search_path, spath, NULL, MAX_PATH, path, NULL); + found = SearchPathA(sp, spath, NULL, MAX_PATH, path, NULL); } } return found;