From 1914fa27565b68ae6b7193ac41f3ae4f51720a74 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 4 Jul 2020 01:36:46 +0900 Subject: [PATCH] [qwaq] Use full file path for file search Fixes the memory leak (over 300 editors...) --- ruamoko/qwaq/debugger/debugger.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruamoko/qwaq/debugger/debugger.r b/ruamoko/qwaq/debugger/debugger.r index abd8a326b..3acf1707e 100644 --- a/ruamoko/qwaq/debugger/debugger.r +++ b/ruamoko/qwaq/debugger/debugger.r @@ -53,6 +53,7 @@ -(Editor *) find_file:(string) filename { Editor *file; + filename = qdb_get_file_path (target, filename); for (int i = [files count]; i-- > 0; ) { file = [files objectAtIndex: i]; if ([file filename] == filename) { @@ -62,8 +63,7 @@ Rect rect = {{1, 1}, [source_window size]}; rect.extent.width -= 2; rect.extent.height -= 2; - string filepath = qdb_get_file_path (target, filename); - file = [Editor withRect:rect file:filepath]; + file = [Editor withRect:rect file:filename]; [files addObject: file]; return file; }