Fixed off-by-one error from refactoring.

This commit is contained in:
Johny Mattsson 2015-06-03 17:20:55 +10:00
parent 06724fbb17
commit d855584bae
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ static const char hex[] = "0123456789abcdef";
// note: supports in-place encoding
void crypto_encode_asciihex (const char *bin, size_t binlen, char *outbuf)
{
size_t aidx = binlen * 2;
size_t aidx = binlen * 2 -1;
int i;
for (i = binlen -1; i >= 0; --i)
{