From e412759d7e551e3fc4dc4be6e1fae1cd4f308868 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 3 Jul 2012 21:47:03 +0000 Subject: no more PLUGININFOEX::replacesDefaultModule, that old & nasty clutch since now all Myranda plugins are binary incompatible with Miranda's git-svn-id: http://svn.miranda-ng.org/main/trunk@743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CryptoPP/base64.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/CryptoPP/base64.cpp') diff --git a/plugins/CryptoPP/base64.cpp b/plugins/CryptoPP/base64.cpp index 1a752bc507..7495dd234f 100644 --- a/plugins/CryptoPP/base64.cpp +++ b/plugins/CryptoPP/base64.cpp @@ -1,7 +1,8 @@ #include "commonheaders.h" -string base64encode(const string buf) { +string base64encode(const string buf) +{ string out; char *base64 = base64encode(buf.data(), buf.length()); out.assign(base64); @@ -42,7 +43,7 @@ char *base64encode(const char *inBuffer, const int count) { string base64decode(const string buf) { string out; - int len = buf.length(); + size_t len = buf.length(); char *plain = base64decode(buf.data(), &len); out.assign(plain,len); free(plain); @@ -52,7 +53,7 @@ string base64decode(const string buf) { string base64decode(const char *buf) { string out; - int len = strlen(buf); + size_t len = strlen(buf); char *plain = base64decode(buf, &len); out.assign(plain,len); free(plain); @@ -60,14 +61,14 @@ string base64decode(const char *buf) { } -char *base64decode(const char *inBuffer, int *count) { +char *base64decode(const char *inBuffer, size_t *count) { int srcIndex = 0, destIndex = 0; char *outBuffer = (char *) malloc(*count); while(srcIndex < *count) { BYTE c0, c1, c2 = 0, c3 = 0; - const int delta = *count - srcIndex; + const size_t delta = *count - srcIndex; c0 = decode64(inBuffer[srcIndex++]); c1 = decode64(inBuffer[srcIndex++]); if (delta > 2) { -- cgit v1.2.3