mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
put-bytevector, unget-bytevector: Allow start == bytevector length.
* libguile/r6rs-ports.c (scm_put_bytevector, scm_unget_bytevector): When three arguments (port bv start) are provided, allow start to be equal to the length of the bytevector, resulting in a zero-length write.
This commit is contained in:
parent
155ddcdc3b
commit
ac0d3dcc53
1 changed files with 2 additions and 2 deletions
|
@ -602,7 +602,7 @@ SCM_DEFINE (scm_put_bytevector, "put-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;
|
||||
|
@ -645,7 +645,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue