Fix bug in reading IEEE 802.15.4 Extended Address from a MAC header. (#201)

This commit is contained in:
Jonathan Hui
2016-06-23 14:14:44 -07:00
committed by GitHub
parent dc8eb6f44a
commit 8ca07553f6
+2 -2
View File
@@ -259,9 +259,9 @@ static inline void getExtAddress(const uint8_t *frame, otExtAddress *address)
{
size_t i;
for (i = 0; i < sizeof(address); i++)
for (i = 0; i < sizeof(otExtAddress); i++)
{
address->m8[i] = frame[IEEE802154_DSTADDR_OFFSET + (7 - i)];
address->m8[i] = frame[IEEE802154_DSTADDR_OFFSET + (sizeof(otExtAddress) - 1 - i)];
}
}