summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-13 12:11:15 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-13 12:11:15 -0700
commitf6c67325ebb931ecad6c0f0e90302d854db75900 (patch)
tree347b7e3dbdd9b0cd397fd66e4b37f82ca924fcf4
parent452b4f3f0ce1411350d57373528ccde77e40727d (diff)
downloadpdfium-f6c67325ebb931ecad6c0f0e90302d854db75900.tar.xz
Merge to XFA: wstring allocations waste up to 7 wasted bytes.
Original Review URL: https://codereview.chromium.org/1399983003 . (cherry picked from commit 6eeffab789800e2afa1b9d10de70c9116db32355) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1399893003 .
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index e7f8c01d41..c097e1fc09 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -32,7 +32,7 @@ CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen) {
int usableLen = (totalSize - overhead) / sizeof(FX_WCHAR);
FXSYS_assert(usableLen >= nLen);
- void* pData = FX_Alloc(uint8_t, iSize.ValueOrDie());
+ void* pData = FX_Alloc(uint8_t, totalSize);
return new (pData) StringData(nLen, usableLen);
}
CFX_WideString::~CFX_WideString() {