mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 03:00:25 +02:00
Fix size measurement in bytevector_large_set
* libguile/bytevectors.c (bytevector_large_set): Fix computation of value size in words. * test-suite/tests/bytevectors.test: Add test. Thanks to Ben Rocer <fleabyte@mail.com> for the bug report and fix.
This commit is contained in:
parent
0a3ea0586d
commit
b77642dff2
2 changed files with 9 additions and 4 deletions
|
@ -345,7 +345,11 @@
|
|||
(let ((b (make-bytevector 8)))
|
||||
(bytevector-s64-set! b 0 -1 (endianness big))
|
||||
(bytevector-u64-set! b 0 0 (endianness big))
|
||||
(= 0 (bytevector-u64-ref b 0 (endianness big))))))
|
||||
(= 0 (bytevector-u64-ref b 0 (endianness big)))))
|
||||
|
||||
(pass-if-exception "bignum out of range"
|
||||
exception:out-of-range
|
||||
(bytevector-u64-set! (make-bytevector 8) 0 (expt 2 64) (endianness big))))
|
||||
|
||||
|
||||
(with-test-prefix/c&e "2.8 Operations on IEEE-754 Representations"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue