Patch #1503718: "Strange results from Common::computeCapacity"

svn-id: r22998
This commit is contained in:
Eugene Sandulenko 2006-06-10 07:56:09 +00:00
parent eca46382d5
commit 5b1aaf4ea0

View File

@ -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)