mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
Fix optional end argument in `uniform-vector-read!'.
Fixes <http://bugs.gnu.org/15370>. Reported by Thien-Thi Nguyen <ttn@gnu.org>. * libguile/deprecated.c (scm_uniform_vector_read_x): Only multiply by width when argument supplied.
This commit is contained in:
parent
9cdf0ac603
commit
b1fe20c24c
1 changed files with 2 additions and 2 deletions
|
@ -1371,8 +1371,8 @@ SCM_DEFINE (scm_uniform_vector_read_x, "uniform-vector-read!", 1, 3, 0,
|
|||
c_start = SCM_UNBNDP (start) ? 0 : scm_to_size_t (start);
|
||||
c_start *= c_width;
|
||||
|
||||
c_end = SCM_UNBNDP (end) ? SCM_BYTEVECTOR_LENGTH (uvec) : scm_to_size_t (end);
|
||||
c_end *= c_width;
|
||||
c_end = SCM_UNBNDP (end) ? SCM_BYTEVECTOR_LENGTH (uvec)
|
||||
: scm_to_size_t (end) * c_width;
|
||||
|
||||
result = scm_get_bytevector_n_x (port_or_fd, uvec,
|
||||
scm_from_size_t (c_start),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue