Fix bytevector->hex-string.
authorDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 14:17:37 +0000 (10:17 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sun, 13 Jul 2014 14:17:37 +0000 (10:17 -0400)
* tox/util.scm (bytevector->hex-string): Add leading 0 when formatting hex
  digits less than A.

tox/util.scm

index d43d9eb..986ee4d 100644 (file)
@@ -78,7 +78,7 @@ of the contents of the bytevector BV."
   (string-upcase
    (string-concatenate
     (map (lambda (n)
-           (format #f "~x" n))
+           (format #f "~2,'0x" n))
          (bytevector->u8-list bv)))))
 
 (define (utf8-pointer->string pointer length)