From 5b1aaf4ea01cae2014d54752d9354ae6cc8f6c9c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 10 Jun 2006 07:56:09 +0000 Subject: Patch #1503718: "Strange results from Common::computeCapacity" svn-id: r22998 --- common/str.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/str.cpp b/common/str.cpp index 3c6f4edde0..575bb6bdf8 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -40,7 +40,7 @@ static int computeCapacity(int len) { // grows a bit). // Finally, we subtract 1 to compensate for the trailing zero byte. len += 16; - return (len + 32 - 1) & ~0x1F - 1; + return ((len + 32 - 1) & ~0x1F) - 1; } String::String(const char *str, int len, int capacity) -- cgit v1.2.3