diff --git a/src/connection.h b/src/connection.h index 795f627..1c18c9d 100644 --- a/src/connection.h +++ b/src/connection.h @@ -49,7 +49,7 @@ req_finalize(struct Client* client, uint8_t cmdset, uint8_t cmdid, size_t length req->header.preamble = 0x55; req->header.length_l = length & 0xFF; - req->header.length_h = (length >> 8) & 0x3 | 4; + req->header.length_h = ((length >> 8) & 0x3) | 4; req->header.crc = crc8(req, 3); req->header.seq_id = client->seq++; req->header.sender = client->hostbyte;