summaryrefslogtreecommitdiff
path: root/bson/bson-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'bson/bson-inl.h')
-rw-r--r--bson/bson-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bson/bson-inl.h b/bson/bson-inl.h
index d8221d78df0..00f7ac87212 100644
--- a/bson/bson-inl.h
+++ b/bson/bson-inl.h
@@ -124,7 +124,7 @@ dodouble:
int lsz = l.objsize(); // our bin data size in bytes, not including the subtype byte
int rsz = r.objsize();
if ( lsz - rsz != 0 ) return lsz - rsz;
- return memcmp(l.value()+4, r.value()+4, lsz+1);
+ return memcmp(l.value()+4, r.value()+4, lsz+1 /*+1 for subtype byte*/);
}
case RegEx: {
int c = strcmp(l.regex(), r.regex());