summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/jsobj.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/jsobj.cpp b/db/jsobj.cpp
index 9c823dae7f9..530f3f45a6d 100644
--- a/db/jsobj.cpp
+++ b/db/jsobj.cpp
@@ -540,9 +540,10 @@ namespace mongo {
if ( *i != '^' )
return "";
++i;
+
// Empty string matches everything, won't limit our search.
if ( !*i )
- return 0;
+ return "";
stringstream ss;
for( ; *i; ++i ){