Commit 26325646 authored by Petri Hintukainen's avatar Petri Hintukainen

"document" tag checksum calculation

parent a49bdfa4
......@@ -85,10 +85,10 @@ enum tag_identifier decode_descriptor_tag(const uint8_t *buf)
/* calculate tag checksum */
for (i = 0; i < 4; i++) {
checksum += buf[i];
checksum = (uint8_t)(checksum + buf[i]);
}
for (i = 5; i < 16; i++) {
checksum += buf[i];
checksum = (uint8_t)(checksum + buf[i]);
}
if (checksum != buf[4]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment