1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +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:
Ian Price 2013-10-20 20:16:09 +01:00
parent 9cdf0ac603
commit b1fe20c24c

View file

@ -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 = SCM_UNBNDP (start) ? 0 : scm_to_size_t (start);
c_start *= c_width; c_start *= c_width;
c_end = SCM_UNBNDP (end) ? SCM_BYTEVECTOR_LENGTH (uvec) : scm_to_size_t (end); c_end = SCM_UNBNDP (end) ? SCM_BYTEVECTOR_LENGTH (uvec)
c_end *= c_width; : scm_to_size_t (end) * c_width;
result = scm_get_bytevector_n_x (port_or_fd, uvec, result = scm_get_bytevector_n_x (port_or_fd, uvec,
scm_from_size_t (c_start), scm_from_size_t (c_start),