1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

json: parse 64bit numbers, this is required for numbers > 2^31

Our current JSON library jansson only parses signed integers, so
it cannot correctly parse numbers between 2^31 and 2^32 into a
32 bit type.
This commit is contained in:
Daniel Krebs 2018-04-24 13:12:32 +02:00
parent c3993a22c6
commit 5b8f573337

View file

@ -223,8 +223,8 @@ IpCoreFactory::make(PCIeCard* card, json_t *json_ips)
json_t* json_block;
json_object_foreach(json_instance, block_name, json_block) {
unsigned int base, high, size;
int ret = json_unpack(json_block, "{ s: i, s: i, s: i }",
json_int_t base, high, size;
int ret = json_unpack(json_block, "{ s: I, s: I, s: I }",
"baseaddr", &base,
"highaddr", &high,
"size", &size);