diff options
Diffstat (limited to 'core/fxcrt/cfx_string_data_template.h')
-rw-r--r-- | core/fxcrt/cfx_string_data_template.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/cfx_string_data_template.h b/core/fxcrt/cfx_string_data_template.h index e39f6a5dfd..eabb608818 100644 --- a/core/fxcrt/cfx_string_data_template.h +++ b/core/fxcrt/cfx_string_data_template.h @@ -21,7 +21,7 @@ class CFX_StringDataTemplate { // NUL char that is not included in |m_nAllocLength|. int overhead = offsetof(CFX_StringDataTemplate, m_String) + sizeof(CharType); - pdfium::base::CheckedNumeric<int> nSize = nLen; + pdfium::base::CheckedNumeric<FX_STRSIZE> nSize = nLen; nSize *= sizeof(CharType); nSize += overhead; @@ -31,8 +31,8 @@ class CFX_StringDataTemplate { // by using this otherwise wasted space. nSize += 7; nSize &= ~7; - int totalSize = nSize.ValueOrDie(); - int usableLen = (totalSize - overhead) / sizeof(CharType); + FX_STRSIZE totalSize = nSize.ValueOrDie(); + FX_STRSIZE usableLen = (totalSize - overhead) / sizeof(CharType); ASSERT(usableLen >= nLen); void* pData = pdfium::base::PartitionAllocGeneric( |