From c14f40fcb7fef6a2b5c667be5e6a380e82f6233d Mon Sep 17 00:00:00 2001 From: Andrei Alexandrescu Date: Sat, 11 Aug 2012 12:08:51 -0700 Subject: [PATCH] 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 --- folly/FBString.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1