diff --git a/src/hash.c b/src/hash.c index c1712e5..9c05afb 100644 --- a/src/hash.c +++ b/src/hash.c @@ -79,8 +79,9 @@ void hash_trunc(unsigned char *hash32oct, unsigned char *buf) { void concat_data(pub_data *data, unsigned char *buf) { // Turn seqno to big endian uint16_t seqno = htobe16(data->seqno); + uint64_t id = htobe64(data->id); - if (memcpy(buf, (char*) &data->id, 8) == NULL) { + if (memcpy(buf, (char*) &id, 8) == NULL) { print_debug(">> Concat the data (id) didn't work !"); } if (memcpy(buf+8, (char*) &seqno, 2) == NULL) {