fix bogus assert

This commit is contained in:
David Rose 2011-06-20 20:20:37 +00:00
parent c66ef96b2c
commit 8fd5dff01c
2 changed files with 7 additions and 2 deletions

View File

@ -607,7 +607,10 @@ quick_set_pointer(int row) {
_pointer = _pointer_begin + _packer->_column->get_start() + _stride * row;
#if defined(_DEBUG)
nassertv(_pointer_begin == _pointer_end || _pointer < _pointer_end);
// We have to allow the pointer to exceed the end by up to one row's
// width. This wouldn't be legal on a plain GeomVertexReader, but
// it *is* legal for a GeomVertexRewriter.
nassertv(_pointer_begin == _pointer_end || (_pointer - _packer->_column->get_start()) <= _pointer_end);
#endif
}

View File

@ -860,7 +860,9 @@ quick_set_pointer(int row) {
_pointer = _pointer_begin + _packer->_column->get_start() + _stride * row;
#if defined(_DEBUG)
nassertv(_pointer_begin == _pointer_end || _pointer <= _pointer_end);
// We have to allow the pointer to exceed the end by up to one row's
// width, because the next call might be to add_data_*().
nassertv(_pointer_begin == _pointer_end || (_pointer - _packer->_column->get_start()) <= _pointer_end);
#endif
}