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) {
|
if (_reverse) {
|
||||||
// start at last interval, right endpoint
|
// start at last interval, right endpoint
|
||||||
_currentInterval = n - 1;
|
_currentInterval = n - 1;
|
||||||
_cursor = _intervals[n -1]->_rightEndPoint;
|
_cursor = _intervals.at(_currentInterval)->_rightEndPoint;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// start at first interval, left endpoint
|
// start at first interval, left endpoint
|
||||||
_currentInterval = 0;
|
_currentInterval = 0;
|
||||||
_cursor = _intervals[0]->_leftEndPoint;
|
_cursor = _intervals.at(_currentInterval)->_leftEndPoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue