mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
fix(manifest): return the matching PAB manifest entry (#28315)
board_query_manifest walked the list for mft[ndx].id == id then returned &mft[id]. On a sparse list that is the wrong row, and for PX4_MFT_T100_ETH (id 7) it is out of bounds. Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
1 parent
7c796818e7
commit
db3b630dde
1 file changed
+1
-1
@@ -560,7 +560,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
|
||||
if (boards_manifest != px4_hw_mft_list_uninitialized)
|
||||
for (unsigned int ndx = 0; ndx < boards_manifest->entries; ndx++) {
|
||||
if (boards_manifest->mft[ndx].id == id) {
|
||||
rv = &boards_manifest->mft[id];
|
||||
rv = &boards_manifest->mft[ndx];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user