From 8483b9525665bc6b61baced8887259e88dd1b110 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 20 Apr 2011 11:28:16 +0000 Subject: [PATCH] Fixed #1004 --- modules/core/test/test_ds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/test/test_ds.cpp b/modules/core/test/test_ds.cpp index f19c6bb9de..5627c9cd6b 100644 --- a/modules/core/test/test_ds.cpp +++ b/modules/core/test/test_ds.cpp @@ -717,7 +717,7 @@ int Core_SeqBaseTest::test_get_seq_reading( int _struct_idx, int iters ) CV_TS_SEQ_CHECK_CONDITION( memcmp(elem, cvTsSimpleSeqElem(sseq, pos), sseq->elem_size) == 0, "reading is incorrect" ); pos += direction; - if( pos < 0 ) pos += total; + if( -pos > 0 ) pos += total; if( pos >= total ) pos -= total; CV_TS_SEQ_CHECK_CONDITION( pos == cvGetSeqReaderPos( &reader ),