Fix cast from pointer to integer of different size

This commit is contained in:
Romain Tartière 2017-04-19 13:15:19 +02:00 committed by GitHub
parent b131f74ea6
commit 3975019b3c

View file

@ -125,7 +125,7 @@ main (int argc, char *argv[])
payload_length = ndef_record[2];
payload_length_length = 1;
} else {
payload_length = be32toh ((uint32_t) ndef_record + 2);
payload_length = be32toh (*(uint32_t *)(ndef_record + 2));
payload_length_length = 4;
}
ndef_record_length += payload_length_length;