sxt: rdb fixes with sizes;
This commit is contained in:
parent
bab197862c
commit
90b6c6a178
@ -156,7 +156,7 @@ uint32_t sxtrdb_read_u64(sxtrdb_t *b, uint64_t *o)
|
||||
|
||||
u = *((uint64_t *)(b->raw + b->curr));
|
||||
b->curr += sizeof(uint64_t);
|
||||
*o = ntohl(u);
|
||||
*o = ntohll(u);
|
||||
|
||||
return sizeof(uint64_t);
|
||||
}
|
||||
@ -252,7 +252,7 @@ uint32_t sxtrdb_write_u64(sxtrdb_t *b, uint64_t uu)
|
||||
if(__rdb_grow(b, sizeof(uint64_t))) return 0;
|
||||
}
|
||||
|
||||
*(uint32_t *)(b->raw + b->ulength) = ntohll(uu);
|
||||
*(uint64_t *)(b->raw + b->ulength) = ntohll(uu);
|
||||
b->ulength += sizeof(uint64_t);
|
||||
|
||||
return sizeof(uint64_t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user