From 420e356f343cb2c6ab55f2c31abce57b0ff3b0c7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 24 Feb 2023 13:32:22 -0500 Subject: [PATCH] Fix Redumper write offset support --- CHANGELIST.md | 1 + MPF.Modules/Redumper/Parameters.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 1a4b312f..92a53d42 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -63,6 +63,7 @@ - Introduce cross-platform MMI - Remove System.Management - Add Redumper Universal Hash support +- Fix Redumper write offset support ### 2.4 (2022-10-26) diff --git a/MPF.Modules/Redumper/Parameters.cs b/MPF.Modules/Redumper/Parameters.cs index 198b76d6..ec304020 100644 --- a/MPF.Modules/Redumper/Parameters.cs +++ b/MPF.Modules/Redumper/Parameters.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; @@ -1006,7 +1006,7 @@ namespace MPF.Modules.Redumper { try { - // We skip during detection and get the write offset + // If we find the universal hash line, return the hash only string line; while (!sr.EndOfStream) { @@ -1046,11 +1046,12 @@ namespace MPF.Modules.Redumper if (sr.EndOfStream) return null; - // We skip during detection and get the write offset + // If we find the disc write offset line, return the offset string line; - while (!sr.EndOfStream && !(line = sr.ReadLine().TrimStart()).StartsWith("detection complete")) + while (!sr.EndOfStream) { - if (line.StartsWith("disc write offset:")) + line = sr.ReadLine().TrimStart(); + if (line.StartsWith("disc write offset")) return line.Substring("disc write offset: ".Length).Trim(); }