diff --git a/libhdt/src/triples/BitmapTriplesIterators.cpp b/libhdt/src/triples/BitmapTriplesIterators.cpp index e975966a..88fa4ffa 100644 --- a/libhdt/src/triples/BitmapTriplesIterators.cpp +++ b/libhdt/src/triples/BitmapTriplesIterators.cpp @@ -785,7 +785,7 @@ void ObjectIndexIterator::updateOutput() { bool ObjectIndexIterator::hasNext() { - return posIndex <= maxIndex; + return posIndex <= maxIndex && maxIndex >= 0; } TripleID *ObjectIndexIterator::next()