Sfoglia il codice sorgente

BLE_TX.cpp: fix advertising crashing due to zero length data

Dusan Zivkovic 3 anni fa
parent
commit
7775ba769f
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      RemoteIDModule/BLE_TX.cpp

+ 1 - 0
RemoteIDModule/BLE_TX.cpp

@@ -169,6 +169,7 @@ bool BLE_TX::transmit_legacy(ODID_UAS_Data &UAS_data)
     // combine header with payload
     memset(legacy_payload, 0, sizeof(legacy_payload));
     memcpy(legacy_payload, header, sizeof(header));
+    legacy_length = sizeof(header);
 
     switch (legacy_phase)
     {