Browse Source

fix protocol_splitter: increment i properly in scan_for_packets

This also guarantees that i is increased in every loop iteration.
Before it was possible to enter a busy loop.
master
Beat Küng 3 years ago committed by Daniel Agar
parent
commit
8b2016b4ed
  1. 2
      src/drivers/protocol_splitter/protocol_splitter.cpp

2
src/drivers/protocol_splitter/protocol_splitter.cpp

@ -548,7 +548,7 @@ void DevCommon::scan_for_packets() @@ -548,7 +548,7 @@ void DevCommon::scan_for_packets()
perf_set_count(header_bytes_received_count, _read_buffer->header_bytes_received);
i += payload_len;
i += Sp2HeaderSize + payload_len;
}
}

Loading…
Cancel
Save