Bugfixes part 3 #209

Open
andrey wants to merge 36 commits from bugfixes3 into master
Showing only changes of commit 1aa6f1af81 - Show all commits
+2 -1
View File
@@ -198,10 +198,11 @@ PIByteArray PIByteArray::fromBase64(const PIByteArray & base64) {
base64HelpStruct hs;
PIByteArray ret;
const int sz = base64.size_s();
if (sz < 4) return PIByteArray();
int ind = -1;
uchar t[4];
ret.resize(sz / 4 * 3);
for (int i = 0; i < sz; i += 4) {
for (int i = 0; i < sz / 4 * 4; i += 4) {
hs.setAscii(base64.data(i));
hs.getBytes(t);
ret[++ind] = (t[0]);