mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 12:06:40 +00:00
NIFStream: don't read vectors of zero length
This commit is contained in:
parent
d078907dcb
commit
6dca3e68a6
1 changed files with 2 additions and 0 deletions
|
@ -107,6 +107,8 @@ namespace Nif
|
|||
template <class T>
|
||||
void readVector(std::vector<T>& vec, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return;
|
||||
vec.resize(size);
|
||||
read(vec.data(), size);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue