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:
parent
b032b50b6a
commit
e01c51bbc6
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue