Add missing newline; Turn an error into a WARN

- Added missing newline to a delay packet warning.
- Turned the error for the invalid checksum on a delay packet into a
  warning.
This commit is contained in:
Zorchenhimer 2025-11-07 21:43:41 -05:00
parent b032b50b6a
commit e01c51bbc6
Signed by: Zorchenhimer
GPG Key ID: 70A1AB767AAB9C20
1 changed files with 5 additions and 3 deletions

View File

@ -114,7 +114,7 @@ func decodeDelay(page *Page, data []byte, idx int) (Packet, int, error) {
count++ count++
} }
if count%2 != 0 { if count%2 != 0 {
fmt.Printf("0xAA delay packet at offset %08X has odd number of 0xAA's", idx+page.FileOffset) fmt.Printf("0xAA delay packet at offset %08X has odd number of 0xAA's\n", idx+page.FileOffset)
} }
pd := &packetDelay{ pd := &packetDelay{
Length: count, Length: count,
@ -123,7 +123,9 @@ func decodeDelay(page *Page, data []byte, idx int) (Packet, int, error) {
checksum := calcChecksum(data[idx : idx+count+3]) checksum := calcChecksum(data[idx : idx+count+3])
if checksum != 0xC5 { if checksum != 0xC5 {
return nil, 0, fmt.Errorf("Invalid checksum for delay packet starting at offset %08X. Got %02X, expected %02X", // return nil, 0, fmt.Errorf("Invalid checksum for delay packet starting at offset %08X. Got %02X, expected %02X",
// pd.address, checksum, 0xC5)
fmt.Printf("WARN: Invalid checksum for delay packet starting at offset %08X. Got %02X, expected %02X\n",
pd.address, checksum, 0xC5) pd.address, checksum, 0xC5)
} }