} else if (i == nbytes + 2) {
outptr[-1] = '=';
outptr[-2] = '=';
+ } else if (i == nbytes) {
+ debug("uuencode: i == nbytes");
+ *(outptr++) = '=';
}
*outptr = '\0';
return (outptr - bufcoded);
* buffer, adjust the number of input bytes downwards.
*/
bufin = bufcoded;
- while (DEC(*(bufin++)) <= MAXVAL);
+ while (DEC(*(bufin++)) <= MAXVAL)
+ ;
nprbytes = bufin - bufcoded - 1;
nbytesdecoded = ((nprbytes + 3) / 4) * 3;
if (nbytesdecoded > outbufsize)