diff options
Diffstat (limited to 'core/hrtf.cpp')
-rw-r--r-- | core/hrtf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/hrtf.cpp b/core/hrtf.cpp index d94c0569..d4d69815 100644 --- a/core/hrtf.cpp +++ b/core/hrtf.cpp @@ -408,7 +408,8 @@ std::unique_ptr<HrtfStore> CreateHrtfStore(uint rate, ushort irSize, auto delays_ = reinterpret_cast<ubyte2*>(base + offset); offset += sizeof(delays_[0])*irCount; - assert(offset == total); + if(unlikely(offset != total)) + throw std::runtime_error{"HrtfStore allocation size mismatch"}; /* Copy input data to storage. */ std::uninitialized_copy(fields.cbegin(), fields.cend(), field_); |