mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-30 04:30:28 +08:00
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.
This commit is contained in:
1 parent
cf3db0d313
commit
8b2016b4ed
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user