mirror of
https://github.com/thelsing/knx.git
synced 2025-01-30 00:19:01 +01:00
fix: check initalize AssociationTableData
This commit is contained in:
parent
f7ac39c66f
commit
2934782d3c
@ -53,6 +53,7 @@ void AssociationTableObject::prepareBinarySearch()
|
|||||||
// we iterate through all ASAP
|
// we iterate through all ASAP
|
||||||
// the first n ASAP are sorted (strictly increasing number), these are assigning sending TSAP
|
// the first n ASAP are sorted (strictly increasing number), these are assigning sending TSAP
|
||||||
// the remaining ASAP have to be all repetitions, otherwise we set sortedEntryCount to 0, which forces linear search
|
// the remaining ASAP have to be all repetitions, otherwise we set sortedEntryCount to 0, which forces linear search
|
||||||
|
if(_tableData != nullptr) {
|
||||||
for (uint16_t idx = 0; idx < entryCount(); idx++)
|
for (uint16_t idx = 0; idx < entryCount(); idx++)
|
||||||
{
|
{
|
||||||
currentASAP = getASAP(idx);
|
currentASAP = getASAP(idx);
|
||||||
@ -89,6 +90,7 @@ void AssociationTableObject::prepareBinarySearch()
|
|||||||
// in case complete table is strictly increasing
|
// in case complete table is strictly increasing
|
||||||
if (lookupIdx == 0 && sortedEntryCount == 0)
|
if (lookupIdx == 0 && sortedEntryCount == 0)
|
||||||
sortedEntryCount = entryCount();
|
sortedEntryCount = entryCount();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user