aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-02-16 08:58:25 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2019-02-16 08:58:25 -0800
commit8f36013fac34e7cf7b79456f7f8bec8ad6292c99 (patch)
tree77a9c552f26218523cbc81aa62a513435bb21955
parentd4545d415bf02f098607ef70f0e84fe5685a4139 (diff)
downloadyosys-8f36013fac34e7cf7b79456f7f8bec8ad6292c99.tar.gz
yosys-8f36013fac34e7cf7b79456f7f8bec8ad6292c99.tar.bz2
yosys-8f36013fac34e7cf7b79456f7f8bec8ad6292c99.zip
read_xaiger() to use f.read() not readsome()
-rw-r--r--frontends/aiger/aigerparse.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index ce421a9be..8493264f5 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -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();
}