Try again

This commit is contained in:
Eddie Hung 2019-05-21 17:20:19 -07:00
parent 1bff09f2ff
commit b5a29460b9
1 changed files with 10 additions and 4 deletions

View File

@ -55,10 +55,16 @@ void AigerReader::parse_aiger()
// Optional values // Optional values
B = C = J = F = 0; B = C = J = F = 0;
if (f.peek() == ' ') { if (f.peek() != ' ') goto parse_body;
if (!(f >> B >> C >> J >> F)) if (!(f >> B)) log_error("Invalid AIGER header\n");
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::string line;
std::getline(f, line); // Ignore up to start of next line, as standard std::getline(f, line); // Ignore up to start of next line, as standard