This commit is contained in:
nis 2020-05-04 00:40:54 +02:00
parent bdec3db1c6
commit e757389e32

View File

@ -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) {