From 83e5ccb02f1edc3a288409558be86d7dec96349f Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 10 May 2016 11:08:41 +0200 Subject: [PATCH] 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 c70185e99..49e10792f 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