From fb74dc66491ac3a50cea9e7e586180f13f1f93a1 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Tue, 28 Jan 2014 14:45:26 +1030 Subject: [PATCH] Fix bug in Base64 encoding, trailing pad characters --- str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/str.c b/str.c index c673e721..12fe5830 100644 --- a/str.c +++ b/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; }