tsb_bin: fix false detection when header is all zeros

This commit is contained in:
theubusu
2026-05-27 22:25:00 +02:00
parent 8a90f8b04a
commit 6c51de5d9c
+1 -1
View File
@@ -65,5 +65,5 @@ pub fn is_valid_header_checksum(header_data: &[u8]) -> bool {
//expected checksum at end
let exp = u32::from_be_bytes(header_data[252..256].try_into().unwrap());
calc == exp
calc == exp && exp != 0 /* for false positive (SHOULD BE IMPROVED) */
}