mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-16 16:20:53 +00:00
NIFStream: don't read vectors of zero length
This commit is contained in:
parent
d078907dcb
commit
6dca3e68a6
@ -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…
x
Reference in New Issue
Block a user