Browse Source

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'.")
version-0.8.3
Ludovic Courtès 10 years ago
parent
commit
238e43b9fa
  1. 2
      guix/store.scm

2
guix/store.scm

@ -162,7 +162,7 @@
(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)))

Loading…
Cancel
Save