projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2353d28
)
Fix use of signed integers in JSON back-end
author
Clifford Wolf
<clifford@clifford.at>
Tue, 14 Aug 2018 21:31:25 +0000
(23:31 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Tue, 14 Aug 2018 21:31:25 +0000
(23:31 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
backends/json/json.cc
patch
|
blob
|
history
diff --git
a/backends/json/json.cc
b/backends/json/json.cc
index d3b7077a24c3a8d4144bc365f231fbf6419bebca..1a3ca64a307734015c9d9018353411b3632cde0e 100644
(file)
--- a/
backends/json/json.cc
+++ b/
backends/json/json.cc
@@
-93,8
+93,10
@@
struct JsonWriter
f << get_string(param.second.decode_string());
else if (GetSize(param.second.bits) > 32)
f << get_string(param.second.as_string());
- else
+ else
if ((param.second.flags & RTLIL::ConstFlags::CONST_FLAG_SIGNED) != 0)
f << stringf("%d", param.second.as_int());
+ else
+ f << stringf("%u", param.second.as_int());
first = false;
}
}