Skip to content

Commit

Permalink
b64_encode: Fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed May 13, 2019
1 parent 77d7455 commit 6c07c96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ int b64_encode(const void *src, size_t srclen, void *dest, size_t destsize)
*output++ = Base64[i3];
skip = 3;
} else {
*output++ = Base64[i1];
int i2 = ((input[1] & 0xF) << 2);
*output++ = Base64[i2];
*output++ = '=';
skip = 2;
}
Expand Down

0 comments on commit 6c07c96

Please sign in to comment.