Fix debug build.
authorAndrei Alexandrescu <aalexandre@fb.com>
Sat, 11 Aug 2012 19:08:51 +0000 (12:08 -0700)
committerTudor Bosman <tudorb@fb.com>
Sun, 26 Aug 2012 18:12:58 +0000 (11:12 -0700)
Summary: Only tested in release mode, sigh. Fixed a failing asserd.

Test Plan: tested in dbg mode

Reviewed By: tudorb@fb.com

FB internal diff: D546318

folly/FBString.h

index 58ed77f43f54674ebba6ae696c55e31610ab2d49..9280bf8b814e262b5646883b275fc41d55832eb5 100644 (file)
@@ -1275,7 +1275,7 @@ public:
     push_back(*s++);
     --n;
     memcpy(store_.expand_noinit(n), s, n * sizeof(value_type));
-    assert(size() == oldSize + n);
+    assert(size() == oldSize + n + 1);
     return *this;
   }