diff --git a/lib/rmap.c b/lib/rmap.c index c95d2a7919d5b6c5d1c9994421cbbdad5bd5b288..6deb6a041c9f968d983fc3a6dd606e352026834e 100644 --- a/lib/rmap.c +++ b/lib/rmap.c @@ -472,6 +472,8 @@ int rmap_build_hdr(struct rmap_pkt *pkt, uint8_t *hdr) } else if (!pkt->ri.cmd_resp && pkt->ri.cmd & RMAP_CMD_BIT_WRITE) { /* all headers have data length unless they are a write reply */ return n; + } else { + hdr[n++] = 0x0; /* on other replies, this is a reserved field */ } hdr[n++] = (uint8_t) (pkt->data_len >> 16); /* data len MSB */