Skip to content

Commit

Permalink
fix(Stream): fix broken Windows streams when building without MMAP
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Jun 7, 2024
1 parent 1a4c495 commit 140fcd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ namespace zenkit {
return std::make_unique<detail::ReadMmap>(path);
#else
std::vector<std::byte> data {};
std::ifstream stream {path, std::ios::ate | std::ios::binar};
std::ifstream stream {path, std::ios::ate | std::ios::binary | std::ios::in};
data.resize(static_cast<size_t>(stream.tellg()));
stream.seekg(0);
stream.read(reinterpret_cast<char*>(data.data()), static_cast<std::streamsize>(data.size()));
Expand Down

0 comments on commit 140fcd7

Please sign in to comment.