summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_binarybuf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_binarybuf.cpp')
-rw-r--r--core/fxcrt/cfx_binarybuf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fxcrt/cfx_binarybuf.cpp b/core/fxcrt/cfx_binarybuf.cpp
index a1388b8d32..6c67912d3b 100644
--- a/core/fxcrt/cfx_binarybuf.cpp
+++ b/core/fxcrt/cfx_binarybuf.cpp
@@ -51,7 +51,8 @@ void CFX_BinaryBuf::ExpandBuf(FX_STRSIZE add_size) {
if (m_AllocSize >= new_size.ValueOrDie())
return;
- int alloc_step = std::max(128, m_AllocStep ? m_AllocStep : m_AllocSize / 4);
+ FX_STRSIZE alloc_step = std::max(static_cast<FX_STRSIZE>(128),
+ m_AllocStep ? m_AllocStep : m_AllocSize / 4);
new_size += alloc_step - 1; // Quantize, don't combine these lines.
new_size /= alloc_step;
new_size *= alloc_step;