diff options
Diffstat (limited to 's/d_state.cpp')
-rw-r--r-- | s/d_state.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/s/d_state.cpp b/s/d_state.cpp index dd2fece..16f46cd 100644 --- a/s/d_state.cpp +++ b/s/d_state.cpp @@ -603,7 +603,8 @@ namespace mongo { BSONObj x = loc.obj().extractFields(_key); MyMap::const_iterator a = _map.upper_bound( x ); - a--; + if ( a != _map.begin() ) + a--; bool good = x.woCompare( a->second.first ) >= 0 && x.woCompare( a->second.second ) < 0; #if 0 |