Fix bug in Base64 encoding, trailing pad characters

This commit is contained in:
Andrew Bettison 2014-01-28 14:45:26 +10:30
parent 879395b121
commit fb74dc6649

4
str.c

@ -128,10 +128,10 @@ static size_t _base64_encodev(const char symbols[], char *dstBase64, const struc
if (place)
*dst++ = symbols[buf];
switch (place) {
case 2:
*dst++ = symbols[64];
case 1:
*dst++ = symbols[64];
case 2:
*dst++ = symbols[64];
}
return dst - dstBase64;
}