Fix information pulling for redumper (#682)

* Fix dat pull failure

* Fix c2 error exception

* Update changelist
This commit is contained in:
fuzzball
2024-03-31 01:00:58 +09:00
committed by GitHub
parent 783c323fd0
commit d38b465b08
2 changed files with 6 additions and 4 deletions

View File

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

View File

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