summaryrefslogtreecommitdiff
path: root/src/utils/base64.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-08 22:48:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-08 22:48:01 +0300
commitcd0de3bd2668294ab3174d3b5f032fefc25fa0e8 (patch)
tree54942df2cad49260ae466c23fc2af4ec64c03dfb /src/utils/base64.cpp
parent454508376039429ad292de69cd491badda798062 (diff)
downloadmanaplus-cd0de3bd2668294ab3174d3b5f032fefc25fa0e8.tar.gz
manaplus-cd0de3bd2668294ab3174d3b5f032fefc25fa0e8.tar.bz2
manaplus-cd0de3bd2668294ab3174d3b5f032fefc25fa0e8.tar.xz
manaplus-cd0de3bd2668294ab3174d3b5f032fefc25fa0e8.zip
Fix code style in utils.
Diffstat (limited to 'src/utils/base64.cpp')
-rw-r--r--src/utils/base64.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index 57bc68a7c..feed37066 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -48,8 +48,9 @@ unsigned char *php3_base64_encode(const unsigned char *restrict const string,
{
const unsigned char *current = string;
int i = 0;
- unsigned char *const result = static_cast<unsigned char *>(calloc(
- ((length + 3 - length % 3) * 4 / 3 + 1) * sizeof(unsigned char), 1));
+ unsigned char *const result = static_cast<unsigned char *>(
+ calloc(static_cast<size_t>((length + 3 - length % 3) * 4 / 3 + 1)
+ * sizeof(unsigned char), 1));
if (!result)
return nullptr;