diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-05-21 17:20:19 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-05-21 17:20:19 -0700 |
commit | b5a29460b9328fe86739039b05daaf70355502fa (patch) | |
tree | 87bf3208b7d5cc4b09546067ed9341b4d9acdb76 | |
parent | 1bff09f2ff137c5fe35199bd0f77ce7506c3bfb5 (diff) | |
download | yosys-b5a29460b9328fe86739039b05daaf70355502fa.tar.gz yosys-b5a29460b9328fe86739039b05daaf70355502fa.tar.bz2 yosys-b5a29460b9328fe86739039b05daaf70355502fa.zip |
Try again
-rw-r--r-- | frontends/aiger/aigerparse.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc index 566825ece..e5ec475d1 100644 --- a/frontends/aiger/aigerparse.cc +++ b/frontends/aiger/aigerparse.cc @@ -55,10 +55,16 @@ void AigerReader::parse_aiger() // Optional values B = C = J = F = 0; - if (f.peek() == ' ') { - if (!(f >> B >> C >> J >> F)) - log_error("Invalid AIGER header\n"); - } + if (f.peek() != ' ') goto parse_body; + if (!(f >> B)) log_error("Invalid AIGER header\n"); + if (f.peek() != ' ') goto parse_body; + if (!(f >> C)) log_error("Invalid AIGER header\n"); + if (f.peek() != ' ') goto parse_body; + if (!(f >> J)) log_error("Invalid AIGER header\n"); + if (f.peek() != ' ') goto parse_body; + if (!(f >> F)) log_error("Invalid AIGER header\n"); + +parse_body: std::string line; std::getline(f, line); // Ignore up to start of next line, as standard |