summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-08-20 10:06:47 -0400
committerEliot Horowitz <eliot@10gen.com>2009-08-20 10:06:47 -0400
commit7831db0d557a6464032a7181b524097208a25a05 (patch)
treefaba8a6f803a67be5d6a82080d8b7550a6f06907
parent45683d835df3b17832f29dac33f27bd7e4167136 (diff)
downloadmongo-7831db0d557a6464032a7181b524097208a25a05.tar.gz
fix subobject selector returning the same object twice
-rw-r--r--db/queryutil.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/queryutil.cpp b/db/queryutil.cpp
index 48c2e03bf8c..4a99736ddac 100644
--- a/db/queryutil.cpp
+++ b/db/queryutil.cpp
@@ -258,6 +258,7 @@ namespace mongo {
if ( e.eoo() )
return;
b.append(e);
+ return;
}
string left = path.substr( 0 , i );
@@ -280,6 +281,7 @@ namespace mongo {
for( multimap<string,string>::const_iterator i = p.first; i != p.second; ++i ) {
string next = i->second;
+
if ( e.eoo() ){
}
else if ( next.size() == 0 || next == "." || e.type() != Object ){