updated build system
This commit is contained in:
parent
b26b52fd2d
commit
36e7d06b39
5
support/3rd_party/src/utils/file.cpp
vendored
5
support/3rd_party/src/utils/file.cpp
vendored
@ -109,10 +109,11 @@ auto file::read_(unsigned char *data, std::size_t to_read, std::uint64_t offset,
|
||||
static_cast<std::streamoff>(to_read));
|
||||
if (total_read != nullptr) {
|
||||
auto after = stream_.tellg();
|
||||
if (after == -1) {
|
||||
if (after >= 0) {
|
||||
(*total_read) = static_cast<std::size_t>(after - before);
|
||||
} else if (after == -1 && stream_.fail()) {
|
||||
throw std::runtime_error("failed to tellg() after read");
|
||||
}
|
||||
(*total_read) = static_cast<std::size_t>(after - before);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user