diff --git a/components/nif/nifstream.hpp b/components/nif/nifstream.hpp index b9b2f1923d..a9db083406 100644 --- a/components/nif/nifstream.hpp +++ b/components/nif/nifstream.hpp @@ -107,6 +107,8 @@ namespace Nif template void readVector(std::vector& vec, size_t size) { + if (size == 0) + return; vec.resize(size); read(vec.data(), size); }