[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/05: Fix bug in trampoline_to_c_read
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/05: Fix bug in trampoline_to_c_read |
Date: |
Tue, 10 May 2016 10:51:24 +0000 (UTC) |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit 83e5ccb02f1edc3a288409558be86d7dec96349f
Author: Andy Wingo <address@hidden>
Date: Tue May 10 11:08:41 2016 +0200
Fix bug in trampoline_to_c_read
* libguile/ports.c (trampoline_to_c_read): Fix bug comparing SCM
values.
---
libguile/ports.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/ports.c b/libguile/ports.c
index c70185e..49e1079 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -234,7 +234,7 @@ trampoline_to_c_read (SCM port, SCM dst, SCM start, SCM
count)
SCM_VALIDATE_OPPORT (1, port);
c_start = scm_to_size_t (start);
c_count = scm_to_size_t (count);
- SCM_ASSERT_RANGE (2, start, start <= count);
+ SCM_ASSERT_RANGE (2, start, c_start <= c_count);
SCM_ASSERT_RANGE (3, count, c_start+c_count <= scm_c_bytevector_length
(dst));
return scm_from_size_t