io: don't forget to initialise the mmap size for zero length mappings

This commit is contained in:
Danny Robson 2019-02-03 18:23:22 +11:00
parent 4a4d5f297a
commit b87517759d

View File

@ -47,6 +47,7 @@ mapped_file::mapped_file (::cruft::posix::fd const &src, int const mflags)
// accepted by some systems; like Linux)
if (meta.st_size == 0) {
m_data = nullptr;
m_size = 0;
return;
}