properly set the size in no_flag packets
This commit is contained in:
parent
df4949b897
commit
5324ab1188
@ -177,7 +177,7 @@ fn generate_psopacket_impl(pkt_cmd: u16, name: syn::Ident, attrs: &Vec<AttrType>
|
||||
buf.push(0);
|
||||
}
|
||||
|
||||
let pkt_len = (buf.len() + 8) as u16;
|
||||
let pkt_len = (buf.len() + if #include_flag { 8 } else { 4 }) as u16;
|
||||
let mut prebuf: Vec<u8> = Vec::new();
|
||||
|
||||
prebuf.extend_from_slice(&u16::to_le_bytes(pkt_len));
|
||||
|
Loading…
x
Reference in New Issue
Block a user