0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix BSONObj::valid()

This commit is contained in:
Mathias Stearn 2010-04-07 00:57:46 -04:00
parent 6a13b467ce
commit 2f668bd486

View File

@ -754,7 +754,9 @@ namespace mongo {
if (! it.moreWithEOO() )
return false;
// both throw exception on failure
BSONElement e = it.next(true);
e.validate();
if (e.eoo()){
if (it.moreWithEOO())
@ -762,6 +764,8 @@ namespace mongo {
its.pop_back();
}else if (e.isABSONObj()){
its.push_back(e.embeddedObject());
}else if (e.type() == CodeWScope){
its.push_back(e.codeWScopeObject());
}
}
} catch (...) {