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'.")
This commit is contained in:
Ludovic Courtès 2013-02-03 22:57:58 +01:00
parent 9c63fe6c1f
commit 238e43b9fa

View file

@ -162,7 +162,7 @@ (define (write-string s p)
(l (bytevector-length s))
(m (modulo l 8))
(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)
(put-bytevector p b)))