aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEugene Sandulenko2006-06-10 07:56:09 +0000
committerEugene Sandulenko2006-06-10 07:56:09 +0000
commit5b1aaf4ea01cae2014d54752d9354ae6cc8f6c9c (patch)
treed0b1014cc2c883863b0d1eaddbadf582528d39e1 /common
parenteca46382d553800c43ec12e5d48299d101bb34be (diff)
downloadscummvm-rg350-5b1aaf4ea01cae2014d54752d9354ae6cc8f6c9c.tar.gz
scummvm-rg350-5b1aaf4ea01cae2014d54752d9354ae6cc8f6c9c.tar.bz2
scummvm-rg350-5b1aaf4ea01cae2014d54752d9354ae6cc8f6c9c.zip
Patch #1503718: "Strange results from Common::computeCapacity"
svn-id: r22998
Diffstat (limited to 'common')
-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)