From: Andrei Alexandrescu Date: Sat, 11 Aug 2012 19:08:51 +0000 (-0700) Subject: Fix debug build. X-Git-Tag: v0.22.0~1213 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c14f40fcb7fef6a2b5c667be5e6a380e82f6233d;p=folly.git Fix debug build. 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 --- diff --git a/folly/FBString.h b/folly/FBString.h index 58ed77f4..9280bf8b 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -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; }