read_xaiger() to use f.read() not readsome()
authorEddie Hung <eddieh@ece.ubc.ca>
Sat, 16 Feb 2019 16:58:25 +0000 (08:58 -0800)
committerEddie Hung <eddieh@ece.ubc.ca>
Sat, 16 Feb 2019 16:58:25 +0000 (08:58 -0800)
frontends/aiger/aigerparse.cc

index ce421a9bee16e626abe09ca49bd1159f2100d158..8493264f53bda996bb85d1527228f81226042909 100644 (file)
@@ -202,7 +202,8 @@ void AigerReader::parse_aiger()
 static uint32_t parse_xaiger_literal(std::istream &f)
 {
     boost::endian::big_uint32_buf_t l;
-    if (f.readsome(reinterpret_cast<char*>(&l), sizeof(l)) != sizeof(l))
+    f.read(reinterpret_cast<char*>(&l), sizeof(l));
+    if (f.gcount() != sizeof(l))
         log_error("Offset %ld: unable to read literal!\n", boost::lexical_cast<int64_t>(f.tellg()));
     return l.value();
 }