aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-09-29 15:40:37 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-09-29 15:40:37 +0200
commit9e55b234b47b01dc396e793b7f31236c9e87c185 (patch)
tree7676a77f041a21b9cb0ad2945152ef81e72d6bfb /frontends
parent3f70c1fd26eb109c2c4d899cce55f24bbf04acc1 (diff)
downloadyosys-9e55b234b47b01dc396e793b7f31236c9e87c185.tar.gz
yosys-9e55b234b47b01dc396e793b7f31236c9e87c185.tar.bz2
yosys-9e55b234b47b01dc396e793b7f31236c9e87c185.zip
Fix reading aig files on windows
Diffstat (limited to 'frontends')
-rw-r--r--frontends/aiger/aigerparse.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index b0a04749c..ad35e9d76 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -285,6 +285,8 @@ end_of_header:
}
else if (c == 'c') {
f.ignore(1);
+ if (f.peek() == '\r')
+ f.ignore(1);
if (f.peek() == '\n')
break;
// Else constraint (TODO)
@@ -1062,7 +1064,9 @@ struct AigerFrontend : public Frontend {
#ifdef _WIN32
char fname[_MAX_FNAME];
_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */);
- module_name = fname;
+ char* bn = strdup(fname);
+ module_name = RTLIL::escape_id(bn);
+ free(bn);
#else
char* bn = strdup(filename.c_str());
module_name = RTLIL::escape_id(bn);