diff options
| author | Stenzek <stenzek@gmail.com> | 2019-02-10 13:26:46 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-02-10 13:28:50 +1000 |
| commit | cecefa2d97c953e9a3cd6094f2dcc43fcef491fe (patch) | |
| tree | c40df673c65394e655090cc20812cb2e5d92872b /Source/Core/Common | |
| parent | e030a487412ba432a0671bd1cc6febac25c89ab5 (diff) | |
ChunkFile: Don't access element zero of empty container
This was causing assertion failures in debug MSVC builds.
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/ChunkFile.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h index b4383d2570..aef3a2ec4a 100644 --- a/Source/Core/Common/ChunkFile.h +++ b/Source/Core/Common/ChunkFile.h @@ -262,7 +262,8 @@ private: Do(size); container.resize(size); - DoArray(&container[0], size); + if (size > 0) + DoArray(&container[0], size); } template <typename T> |
