Skip to content
Snippets Groups Projects
Commit 24ea7a8c authored by Studer Gabriel's avatar Studer Gabriel
Browse files

check for valid data stream when reading PagedArray

parent 84fb7478
Branches
Tags
No related merge requests found
......@@ -135,7 +135,10 @@ public:
p.reserve(P);
p.resize(left);
in_stream.read(reinterpret_cast<char*>(&p.front()),
p.size()*sizeof(T));
p.size()*sizeof(T));
if(!in_stream.good()) {
throw ost::Error("Failed to read data!");
}
}
} else {
throw ost::Error("Cannot load non POD paged array!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment