1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

fix armv5 alignment issues

This commit is contained in:
Christian Hammerl
2014-07-31 01:05:10 +02:00
parent 3ef85aae38
commit 52b0ee7ceb
14 changed files with 279 additions and 149 deletions

View File

@@ -382,9 +382,10 @@ void RadioTap::write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU
buffer += sizeof(_max_power);
}
if((_flags & 0x10) != 0 && inner_pdu()) {
*(uint32_t*)(buffer + inner_pdu()->size()) = Endian::host_to_le(
uint32_t crc32 = Endian::host_to_le(
Utils::crc32(buffer, inner_pdu()->size())
);
memcpy(buffer + inner_pdu()->size(), &crc32, sizeof(uint32_t));
}
}
}