aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/libparse.cc
diff options
context:
space:
mode:
authorHenner Zeller <h.zeller@acm.org>2019-05-14 22:01:15 -0700
committerHenner Zeller <h.zeller@acm.org>2019-05-14 22:01:15 -0700
commit5e443a5d0db8f517582818e756871ec2e8117dbe (patch)
tree5886cacde23aaa6adb7497267eb450c29d895383 /passes/techmap/libparse.cc
parentc8c1df23a0ddf85b6d5a822299634b42b82a6e15 (diff)
downloadyosys-5e443a5d0db8f517582818e756871ec2e8117dbe.tar.gz
yosys-5e443a5d0db8f517582818e756871ec2e8117dbe.tar.bz2
yosys-5e443a5d0db8f517582818e756871ec2e8117dbe.zip
Fix two instances of integer-assignment to string.
o In cover.cc, the int-result of mkstemps() was assigned to a string and silently interpreted as a single-character filename with a funny value. Fix with the intent: assign the filename. o in libparse.cc, an int was assigned to a string, but depending on visible constructors, this is ambiguous. Explicitly cast this to a char.
Diffstat (limited to 'passes/techmap/libparse.cc')
-rw-r--r--passes/techmap/libparse.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/techmap/libparse.cc b/passes/techmap/libparse.cc
index 991cc4498..349ccc115 100644
--- a/passes/techmap/libparse.cc
+++ b/passes/techmap/libparse.cc
@@ -94,7 +94,7 @@ int LibertyParser::lexer(std::string &str)
// search for identifiers, numbers, plus or minus.
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.') {
- str = c;
+ str = static_cast<char>(c);
while (1) {
c = f.get();
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.')