瀏覽代碼

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

Dusan Zivkovic 3 年之前
父節點
當前提交
7775ba769f
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)
     {