mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Fix Redumper DAT/layer parsing
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
- Add TODO with notes to Redumper
|
||||
- Fix 2-layer DVD support in Redumper
|
||||
- Fix VSCode build
|
||||
- Fix Redumper DAT/layer parsing
|
||||
|
||||
### 2.5 (2023-03-12)
|
||||
|
||||
|
||||
@@ -1173,7 +1173,10 @@ namespace MPF.Modules.Redumper
|
||||
while (line.StartsWith("<rom"))
|
||||
{
|
||||
datString += line + "\n";
|
||||
line = sr.ReadLine().Trim();
|
||||
if (sr.EndOfStream)
|
||||
break;
|
||||
|
||||
line = sr.ReadLine()?.Trim();
|
||||
}
|
||||
|
||||
return datString.TrimEnd('\n');
|
||||
@@ -1260,6 +1263,10 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
string line = sr.ReadLine()?.Trim();
|
||||
|
||||
// If we have a null line, just break
|
||||
if (line == null)
|
||||
break;
|
||||
|
||||
// Single-layer discs have no layerbreak
|
||||
if (line.Contains("layers count: 1"))
|
||||
{
|
||||
@@ -1275,8 +1282,8 @@ namespace MPF.Modules.Redumper
|
||||
}
|
||||
}
|
||||
|
||||
// If we get to the end, there's an issue
|
||||
return null;
|
||||
// Return the layerbreak, if possible
|
||||
return layerbreak;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user