mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Fix information pulling for redumper (#682)
* Fix dat pull failure * Fix c2 error exception * Update changelist
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Fix missing information in README
|
||||
- Language selections unchecked by default
|
||||
- Update BinaryObjectScanner to 3.1.3
|
||||
- Fix information pulling for redumper (fuzz6001)
|
||||
|
||||
### 3.1.4 (2024-03-16)
|
||||
|
||||
|
||||
@@ -1444,7 +1444,7 @@ namespace MPF.Core.Modules.Redumper
|
||||
try
|
||||
{
|
||||
using var sr = File.OpenText(log);
|
||||
var datString = string.Empty;
|
||||
string? datString = null;
|
||||
|
||||
// Find all occurrences of the hash information
|
||||
while (!sr.EndOfStream)
|
||||
@@ -1452,9 +1452,10 @@ namespace MPF.Core.Modules.Redumper
|
||||
// Fast forward to the dat line
|
||||
while (!sr.EndOfStream && sr.ReadLine()?.TrimStart()?.StartsWith("dat:") == false) ;
|
||||
if (sr.EndOfStream)
|
||||
return null;
|
||||
break;
|
||||
|
||||
// Now that we're at the relevant entries, read each line in and concatenate
|
||||
datString = string.Empty;
|
||||
var line = sr.ReadLine()?.Trim();
|
||||
while (line?.StartsWith("<rom") == true)
|
||||
{
|
||||
@@ -1466,7 +1467,7 @@ namespace MPF.Core.Modules.Redumper
|
||||
}
|
||||
}
|
||||
|
||||
return datString.TrimEnd('\n');
|
||||
return datString?.TrimEnd('\n');
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1702,7 +1703,7 @@ namespace MPF.Core.Modules.Redumper
|
||||
if (line.StartsWith("C2:"))
|
||||
{
|
||||
string[] parts = line.Split(' ');
|
||||
if (!long.TryParse(parts[2], out c2Errors))
|
||||
if (!long.TryParse(parts[1], out c2Errors))
|
||||
c2Errors = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user