Browse Source

Fixed off-by-one error from refactoring.

Johny Mattsson 9 years ago
parent
commit
d855584bae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/crypto/digests.c

+ 1 - 1
app/crypto/digests.c

@@ -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)
   {