minors
authoradam <adamansky@gmail.com>
Mon, 12 Aug 2013 04:21:51 +0000 (11:21 +0700)
committeradam <adamansky@gmail.com>
Mon, 12 Aug 2013 04:21:51 +0000 (11:21 +0700)
tcejdb/bson.c

index 18dffd9..eafef2c 100644 (file)
@@ -1785,7 +1785,7 @@ static bson_visitor_cmd_t _bsonstripvisitor_include(const char *ipath, int ipath
         }
     }
 
-    if (ictx->matched == TCMAPRNUM(ifields)) {
+    if (ictx->nstack == 0 && ictx->matched == TCMAPRNUM(ifields)) {
         return BSON_VCMD_TERMINATE;
     }
     return rv;