1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 07:50:20 +02:00

unget-bytevector: Allow start == length when count is not given.

* libguile/r6rs-ports.c (scm_unget_bytevector): Allow 'start' to be
  equal to the bytevector length when the 'count' optional argument is
  not passed.
This commit is contained in:
Mark H Weaver 2016-03-09 02:58:59 -05:00
parent 461b62efc9
commit ff51de66bd

View file

@ -843,7 +843,7 @@ SCM_DEFINE (scm_unget_bytevector, "unget-bytevector", 2, 2, 0,
}
else
{
if (SCM_UNLIKELY (c_start >= c_len))
if (SCM_UNLIKELY (c_start > c_len))
scm_out_of_range (FUNC_NAME, start);
else
c_count = c_len - c_start;