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
8dcf3c6163
commit
7b1069269b
1 changed files with 1 additions and 1 deletions
|
|
@ -444,7 +444,7 @@ using BACKEND."
|
|||
('big "UTF-32BE")))))
|
||||
(((_ & #x7f = %tc7-bytevector) len address)
|
||||
(let ((bv-port (memory-port backend address len)))
|
||||
(get-bytevector-all bv-port)))
|
||||
(get-bytevector-n bv-port len)))
|
||||
((((len << 8) || %tc7-vector))
|
||||
(let ((words (get-bytevector-n port (* len %word-size)))
|
||||
(vector (make-vector len)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue