mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-12 21:33:03 +00:00
Fix bug in Base64 encoding, trailing pad characters
This commit is contained in:
parent
879395b121
commit
fb74dc6649
4
str.c
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user