Prioritize PacketBuilder found_end_flag() over packet_truncated().

This commit is contained in:
Jared Boone 2015-10-02 22:54:59 -07:00
parent c2e7f9a6f4
commit 4ed385d15e

View File

@ -62,10 +62,15 @@ public:
payload[bits_received++] = symbol; payload[bits_received++] = symbol;
} }
if( found_end_flag() || packet_truncated() ) { if( found_end_flag() ) {
payload_handler(payload, bits_received); payload_handler(payload, bits_received - 7);
reset_state();
} else {
if( packet_truncated() ) {
reset_state(); reset_state();
} }
}
break; break;
default: default: