From: Eddie Hung Date: Tue, 17 Dec 2019 23:43:21 +0000 (-0800) Subject: read_xaiger to cope with optional '\n' after 'c' X-Git-Tag: working-ls180~881^2^2~72 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0875a078710a2d60ec3c55e9b5a87d97fd643f3b;p=yosys.git read_xaiger to cope with optional '\n' after 'c' --- diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc index 65a9e30ae..abc2f4144 100644 --- a/frontends/aiger/aigerparse.cc +++ b/frontends/aiger/aigerparse.cc @@ -379,8 +379,8 @@ void AigerReader::parse_xaiger(const dict &box_lookup) int c = f.get(); if (c != 'c') log_error("Line %u: cannot interpret first character '%c'!\n", line_count, c); - c = f.get(); - log_assert(c == '\n'); + if (f.peek() == '\n') + f.get(); // Parse footer (symbol table, comments, etc.) std::string s;