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

lib/ip: read base addresses from JSON into unsigned integer

This caused sign extension for addresses with the MSB set which is
obviously wrong since this is an address and not a number. With
Jansson, there seems to be now other way since it only supports
reading (signed) integers.
This commit is contained in:
Daniel Krebs 2018-03-26 15:51:41 +02:00
parent aa1592ae2b
commit f025f5dcc7

View file

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