correct check for ACL packet length

This commit is contained in:
mila@ringwald.ch 2013-11-26 23:28:13 +00:00
parent 6c062428e1
commit 9ecc3e1772

View File

@ -287,7 +287,7 @@ static void acl_handler(uint8_t *packet, int size){
} }
// assert packet is complete // assert packet is complete
if (acl_length != size + 4){ if (acl_length + 4 != size){
log_error("hci.c: acl_handler called with ACL packet of wrong size %u, expected %u => dropping packet", size, acl_length + 4); log_error("hci.c: acl_handler called with ACL packet of wrong size %u, expected %u => dropping packet", size, acl_length + 4);
return; return;
} }