From 7831db0d557a6464032a7181b524097208a25a05 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Thu, 20 Aug 2009 10:06:47 -0400 Subject: [PATCH] fix subobject selector returning the same object twice --- db/queryutil.cpp | 2 ++ 1 file changed, 2 insertions(+) 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::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 ){