prevent buffer underflow in Vector4ClipPolygon

This commit is contained in:
Garux 2019-02-22 23:55:20 +03:00
parent 7c2d05f399
commit 9f80983975

View File

@ -96,6 +96,8 @@ typedef Vector4* iterator;
typedef const Vector4* const_iterator;
static std::size_t apply( const_iterator first, const_iterator last, iterator out ){
if( first == last ) /* prevent buffer underflow in compare( *i ); isn't actually required, for technical correctness only */
return 0;
const_iterator next = first, i = last - 1;
iterator tmp( out );
bool b0 = ClipPlane::compare( *i );