diff --git a/support/src/utils/file.cpp b/support/src/utils/file.cpp index fc28ca3f..a938454e 100644 --- a/support/src/utils/file.cpp +++ b/support/src/utils/file.cpp @@ -111,7 +111,7 @@ auto file::read_(unsigned char *data, std::size_t to_read, std::uint64_t offset, auto after = stream_.tellg(); if (after >= 0) { (*total_read) = static_cast(after - before); - } else if (after == -1 && stream_.fail()) { + } else if (after == -1 && not stream_.eof()) { throw std::runtime_error("failed to tellg() after read"); } }