(base64_encode): Bugfix.
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -335,9 +335,9 @@ base64_encode (const char *iptr, size_t isize, char *optr, size_t osize, | ... | @@ -335,9 +335,9 @@ base64_encode (const char *iptr, size_t isize, char *optr, size_t osize, |
335 | } | 335 | } |
336 | *optr++ = b64[ptr[0] >> 2]; | 336 | *optr++ = b64[ptr[0] >> 2]; |
337 | *optr++ = b64[((ptr[0] << 4) + (--isize ? (ptr[1] >> 4): 0)) & 0x3f]; | 337 | *optr++ = b64[((ptr[0] << 4) + (--isize ? (ptr[1] >> 4): 0)) & 0x3f]; |
338 | *optr++ = isize ? b64[((iptr[1] << 2) + (--isize ? (ptr[2] >> 6) : 0 )) & 0x3f] : '='; | 338 | *optr++ = isize ? b64[((ptr[1] << 2) + (--isize ? (ptr[2] >> 6) : 0 )) & 0x3f] : '='; |
339 | *optr++ = isize ? b64[ptr[2] & 0x3f] : '='; | 339 | *optr++ = isize ? b64[ptr[2] & 0x3f] : '='; |
340 | iptr += 3; | 340 | ptr += 3; |
341 | consumed += 3; | 341 | consumed += 3; |
342 | (*nbytes) += 4; | 342 | (*nbytes) += 4; |
343 | (*line_len) +=4; | 343 | (*line_len) +=4; | ... | ... |
-
Please register or sign in to post a comment