Fixed error checking before the variable update (#1902)

This commit is contained in:
Marc Garcia Puig 2019-07-18 11:28:08 +02:00 committed by GitHub
parent e2c4dc1312
commit fe1c4b2ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,9 +133,9 @@ namespace data {
: Array(0u, std::move(data)) {}
void SetOffset(size_t offset) {
_offset = offset;
DEBUG_ASSERT(_data.size() >= _offset);
DEBUG_ASSERT((_data.size() - _offset) % sizeof(T) == 0u);
_offset = offset;
DEBUG_ASSERT(begin() <= end());
}