mirror of https://gitee.com/bigwinds/arangodb
Using bounds checking when accessing the intervals of skiplist index
This commit is contained in:
parent
a9e7adc1ed
commit
40a56efa24
|
@ -217,12 +217,12 @@ void SkiplistIterator::initCursor () {
|
|||
if (_reverse) {
|
||||
// start at last interval, right endpoint
|
||||
_currentInterval = n - 1;
|
||||
_cursor = _intervals[n -1]->_rightEndPoint;
|
||||
_cursor = _intervals.at(_currentInterval)->_rightEndPoint;
|
||||
}
|
||||
else {
|
||||
// start at first interval, left endpoint
|
||||
_currentInterval = 0;
|
||||
_cursor = _intervals[0]->_leftEndPoint;
|
||||
_cursor = _intervals.at(_currentInterval)->_leftEndPoint;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue