do not proceed with removing zero-length slice

This commit is contained in:
Elena Shipunova 2015-09-07 13:50:30 +03:00
parent 6fefc53e56
commit 036c3b4e6d

View File

@ -1689,6 +1689,9 @@ cvSeqRemoveSlice( CvSeq* seq, CvSlice slice )
slice.end_index = slice.start_index + length;
if ( slice.start_index == slice.end_index )
return;
if( slice.end_index < total )
{
CvSeqReader reader_to, reader_from;