diff --git a/src/cpp/kazMisc.cpp b/src/cpp/kazMisc.cpp index 0bb12c7..03f17a0 100644 --- a/src/cpp/kazMisc.cpp +++ b/src/cpp/kazMisc.cpp @@ -311,8 +311,7 @@ kaz::base64Decode (string &content) { buff [j] = 0; *q = buff [0] << 2 | (buff [1] & 0x30) >> 4; ++q; - --idx; - if (idx) { + if (idx > 2) { *q = buff [1] << 4 | (buff [2] & 0x3c) >> 2; ++q; }