Commit c894e162 c894e1628a47a221e56b306f68015a876c964600 by Sergey Poznyakoff

(base64_encode): Bugfix.

1 parent 1588186a
...@@ -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;
......