mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-14 01:30:19 +02:00
Handle zero-length bytevectors correctly in (system base types).
* module/system/base/types.scm (cell->object): Use 'get-bytevector-n' instead of 'get-bytevector-all', so that the zero-length case does not return EOF.
This commit is contained in:
parent
4ab9f0f8b9
commit
2c032c2215
1 changed files with 1 additions and 1 deletions
|
@ -443,7 +443,7 @@ using BACKEND."
|
||||||
('big "UTF-32BE")))))
|
('big "UTF-32BE")))))
|
||||||
(((_ & #x7f = %tc7-bytevector) len address)
|
(((_ & #x7f = %tc7-bytevector) len address)
|
||||||
(let ((bv-port (memory-port backend address len)))
|
(let ((bv-port (memory-port backend address len)))
|
||||||
(get-bytevector-all bv-port)))
|
(get-bytevector-n bv-port len)))
|
||||||
((((len << 7) || %tc7-vector) weakv-data)
|
((((len << 7) || %tc7-vector) weakv-data)
|
||||||
(let* ((len (arithmetic-shift len -1))
|
(let* ((len (arithmetic-shift len -1))
|
||||||
(words (get-bytevector-n port (* len %word-size)))
|
(words (get-bytevector-n port (* len %word-size)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue