diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2023-05-01 08:23:38 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2023-05-01 08:23:38 -0700 |
| commit | 1c5678f77a61cf84f458376cccbd86a6d6942457 (patch) | |
| tree | 050cb6209cc15dc30940a459d8bad40f249d9e36 | |
| parent | a89d6c82e981fec7d6e4c975e083d2b9e04467ad (diff) | |
| download | chromatopelma-1c5678f77a61cf84f458376cccbd86a6d6942457.tar.zst | |
Fix an encoding issue for negative numbers.
| l--------- | guile-compat/lib/csc | 2 | ||||
| -rw-r--r-- | lib/csc/encoding.scheme | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/guile-compat/lib/csc b/guile-compat/lib/csc index c25bddb..c8a0323 120000 --- a/guile-compat/lib/csc +++ b/guile-compat/lib/csc @@ -1 +1 @@ -../..
\ No newline at end of file +../../lib/csc
\ No newline at end of file diff --git a/lib/csc/encoding.scheme b/lib/csc/encoding.scheme index dfe6fb7..04f4dee 100644 --- a/lib/csc/encoding.scheme +++ b/lib/csc/encoding.scheme @@ -1,5 +1,5 @@ (define-library (csc encoding) - (export encode translate-labels) + (export encode int->le-bytes) (import (scheme base) (prefix (csc list) list.) (prefix (csc map) map.)) @@ -96,7 +96,7 @@ (< n #x-4000000000000000)) (error "int constant too large" n)) (when (negative? n) - (set! n (- #x10000000000000000 n))) + (set! n (+ #x10000000000000000 n))) (64->le-bytes w (+ 1 (* 2 n)))) |
