aboutsummaryrefslogtreecommitdiffstats
path: root/csc/compare.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-25 20:52:21 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-25 20:52:21 -0700
commit685a50d312624190c2f1beb4a0091fee4a7b00a6 (patch)
tree34039645ebec1027c118a9f76a01f36eeec7752a /csc/compare.csc
parentWrite unit tests for codegen. (diff)
downloadchromatopelma-685a50d312624190c2f1beb4a0091fee4a7b00a6.tar.zst
Fix a bug in comparing bytevectors.
Diffstat (limited to 'csc/compare.csc')
-rw-r--r--csc/compare.csc4
1 files changed, 3 insertions, 1 deletions
diff --git a/csc/compare.csc b/csc/compare.csc
index 794d795..fad9e4b 100644
--- a/csc/compare.csc
+++ b/csc/compare.csc
@@ -205,7 +205,9 @@
(cons bytevector? (lambda (b)
(list (cons '!type 'bytevector)
(cons 'value (loop for i below (bytevector-length b)
- collect (string-append "0x" (number->string (bytevector-u8-ref b i))))))))))
+ collect (string-append "0x" (number->string
+ (bytevector-u8-ref b i)
+ 16)))))))))
; Returns a string diff between x and y. Diff knows how to compare lists,