Linux: Fixed infinite loop when loading some .dbg files

This commit is contained in:
Souryo 2017-11-10 17:18:43 -05:00
parent 64f911d58a
commit 8d8b74f77f

View file

@ -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);