From f025f5dcc7d5faeb7f6a1c72c50f9329e32f3c25 Mon Sep 17 00:00:00 2001 From: Daniel Krebs Date: Mon, 26 Mar 2018 15:51:41 +0200 Subject: [PATCH] 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. --- fpga/lib/ip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpga/lib/ip.cpp b/fpga/lib/ip.cpp index 41ca7c52e..d1d2d33a6 100644 --- a/fpga/lib/ip.cpp +++ b/fpga/lib/ip.cpp @@ -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,