From 8d8b74f77f716441d493d74a8e70146e4473e86b Mon Sep 17 00:00:00 2001 From: Souryo Date: Fri, 10 Nov 2017 17:18:43 -0500 Subject: [PATCH] Linux: Fixed infinite loop when loading some .dbg files --- GUI.NET/Debugger/DbgImporter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GUI.NET/Debugger/DbgImporter.cs b/GUI.NET/Debugger/DbgImporter.cs index b6f1e5a9..814d3dd7 100644 --- a/GUI.NET/Debugger/DbgImporter.cs +++ b/GUI.NET/Debugger/DbgImporter.cs @@ -77,8 +77,8 @@ namespace Mesen.GUI.Debugger while(!File.Exists(sourceFile)) { //Go back up folder structure to attempt to find the file string oldPath = basePath; - basePath = Path.GetFullPath(Path.Combine(basePath, @"..\")); - if(basePath == oldPath) { + basePath = Path.GetDirectoryName(basePath); + if(basePath == null || basePath == oldPath) { break; } sourceFile = Path.Combine(basePath, file.Name);