[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/05: unget-bytevector: Allow start == length when coun
From: |
Mark H. Weaver |
Subject: |
[Guile-commits] 01/05: unget-bytevector: Allow start == length when count is not given. |
Date: |
Mon, 20 Jun 2016 19:52:09 +0000 (UTC) |
mhw pushed a commit to branch stable-2.0
in repository guile.
commit ff51de66bd212ded421a7a118a4f55ad2006f918
Author: Mark H Weaver <address@hidden>
Date: Wed Mar 9 02:58:59 2016 -0500
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.
---
libguile/r6rs-ports.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index 1bf766c..bd8a1c4 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -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;