summaryrefslogtreecommitdiff
path: root/db/update.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/update.cpp')
-rw-r--r--db/update.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/db/update.cpp b/db/update.cpp
index 7de9bb1..e79d3d5 100644
--- a/db/update.cpp
+++ b/db/update.cpp
@@ -913,15 +913,14 @@ namespace mongo {
}
}
virtual long long nscanned() {
- assert( _c.get() );
- return _c->nscanned();
+ return _c.get() ? _c->nscanned() : _nscanned;
}
virtual void next() {
if ( ! _c->ok() ) {
setComplete();
return;
}
- _nscanned++;
+ _nscanned = _c->nscanned();
if ( matcher()->matches(_c->currKey(), _c->currLoc(), &_details ) ) {
setComplete();
return;