store: Write string length as a 32-bit integer.
* guix/store.scm (write-string): Write L as a 32-bit integer. Bug
introduced in 82c38fe64c
("store:
Micro-optimize `write-string'.")
master
parent
9c63fe6c1f
commit
238e43b9fa
|
@ -162,7 +162,7 @@
|
||||||
(l (bytevector-length s))
|
(l (bytevector-length s))
|
||||||
(m (modulo l 8))
|
(m (modulo l 8))
|
||||||
(b (make-bytevector (+ 8 l (if (zero? m) 0 (- 8 m))))))
|
(b (make-bytevector (+ 8 l (if (zero? m) 0 (- 8 m))))))
|
||||||
(bytevector-u64-native-set! b 0 l)
|
(bytevector-u32-set! b 0 l (endianness little))
|
||||||
(bytevector-copy! s 0 b 8 l)
|
(bytevector-copy! s 0 b 8 l)
|
||||||
(put-bytevector p b)))
|
(put-bytevector p b)))
|
||||||
|
|
||||||
|
|
Reference in New Issue