aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/str.cpp2
1 files changed, 1 insertions, 1 deletions
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)