Update association_table_object.cpp

Bugfix, find asap in association Table not working correctly
This commit is contained in:
Bernator 2018-11-04 10:01:41 +01:00 committed by GitHub
parent 0762e753f7
commit 643909a7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,8 +54,8 @@ int32_t AssociationTableObject::translateAsap(uint16_t asap)
for (uint16_t i = 0; i < entries; i++) for (uint16_t i = 0; i < entries; i++)
{ {
uint16_t entry = ntohs(operator[](i)); uint16_t entry = ntohs(operator[](i));
if (lowByte(entry) == asap) if (highByte(entry) == asap)
return highByte(entry); return lowByte(entry);
} }
return -1; return -1;
} }
@ -84,4 +84,4 @@ uint8_t AssociationTableObject::propertyCount()
PropertyDescription* AssociationTableObject::propertyDescriptions() PropertyDescription* AssociationTableObject::propertyDescriptions()
{ {
return _propertyDescriptions; return _propertyDescriptions;
} }