summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2020-01-10 08:32:06 +0100
committerUlrich Bauer <mail@ulrich-bauer.org>2020-01-10 08:32:06 +0100
commit67cfa5f488dede857f73059e737cdaea0dedd9b5 (patch)
treec9b4f3a566d312fd4d3180142aa0b6ea545361de
parent47458eed67680f0beba78335b21748c1bfebeb76 (diff)
fixed compile error pointed out by adamConnerSax
-rw-r--r--ripser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 5bc62bc..cd546e8 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -836,7 +836,7 @@ static const bool is_big_endian = *reinterpret_cast<const uint8_t*>(&endian_chec
template <typename T> T read(std::istream& input_stream) {
T result;
char* p = reinterpret_cast<char*>(&result);
- if (input_stream.read(p, sizeof(T)) != sizeof(T) return T();
+ if (input_stream.read(p, sizeof(T)).gcount() != sizeof(T)) return T();
if (is_big_endian) std::reverse(p, p + sizeof(T));
return result;
}