Bytes, not characters (fixes #952)

This commit is contained in:
Matt Nadareski
2026-03-02 20:05:49 -05:00
parent 6b71b972e9
commit 4b23fcf06b
3 changed files with 4 additions and 3 deletions

View File

@@ -53,6 +53,7 @@
- Add retry override for MPF.CLI
- Limit BCA read to 64 bytes for Redumper
- Support more Redumper log outputs
- Bytes, not characters
### 3.6.0 (2025-11-28)

View File

@@ -319,7 +319,7 @@ namespace MPF.Processors.Test
[Fact]
public void GetBCA_ValidPath_Formatted()
{
string expected = "0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n";
string expected = "0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n0001 0203 0405 0607 0809 0A0B 0C0D 0E0F\n";
string bcaPath = Path.Combine(Environment.CurrentDirectory, "TestData", "Redumper", "DVD", "test.bca");
string? actual = Redumper.GetBCA(bcaPath);

View File

@@ -902,8 +902,8 @@ namespace MPF.Processors
if (hex is null)
return null;
// Get the starting index to read at most the last 64 bytes
int startingIndex = hex.Length >= 64 ? hex.Length - 64 : 0;
// Get the starting index to read at most the last 64 bytes (128 characters)
int startingIndex = hex.Length >= 128 ? hex.Length - 128 : 0;
// Separate into blocks of 4 hex digits and newlines
var bca = new StringBuilder();