fix issue with checking crc
This commit is contained in:
parent
6a6b453953
commit
8ac1a1f31e
@ -224,7 +224,7 @@ fn main() {
|
||||
let mut crc32 = crc32fast::Hasher::new();
|
||||
for i in 0..packets.len() {
|
||||
crc32.update(&packets[i]);
|
||||
if packet_hashes[i] != crc32.clone().finalize() {
|
||||
if packet_hashes[i] != crc32.clone().finalize() && packet_hashes[i] != 0 {
|
||||
println!("Packet {} crc does not match, writing .corrupt", i);
|
||||
//TODO: Request packets again
|
||||
let mut file = std::fs::File::create("received/".to_string()+filename+".corrupt").expect("Failed to create file");
|
||||
|
Loading…
x
Reference in New Issue
Block a user