Skip to content

Commit

Permalink
Format CleanRip BCA wtih 2-byte blocks (fixes #743)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Oct 10, 2024
1 parent 60c27ec commit 83a189a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Make .NET 8 the default in issue reports
- Remove ReadLine in list commands
- Sum track errors in Redumper
- Format CleanRip BCA wtih 2-byte blocks

### 3.2.2 (2024-09-24)

Expand Down
4 changes: 3 additions & 1 deletion MPF.Processors/CleanRip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ internal override List<OutputFile> GetOutputFiles(string baseFilename)
if (hex == null)
return null;

return Regex.Replace(hex, ".{32}", "$0\n");
// First separate into lines then into blocks of 4 hex digits
string bca = Regex.Replace(hex, ".{32}", "$0\n");
return Regex.Replace(bca, "[0-9a-fA-F]{4}", "$0 ");
}
catch
{
Expand Down

0 comments on commit 83a189a

Please sign in to comment.