@ -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));