wingo pushed a commit to branch wip-whippet in repository guile. commit 9d8213889bdfe0b262071d32e4683a02ddf82eb0 Author: Andy Wingo <wi...@pobox.com> AuthorDate: Thu Jul 3 15:50:44 2025 +0200
Fix stringbuf error when trying to narrow stringbuf * libguile/strings.c (try_narrow_stringbuf): Fix range check --- libguile/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/strings.c b/libguile/strings.c index f83d986c1..d97c5cb7d 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -253,7 +253,7 @@ widen_stringbuf (struct scm_narrow_stringbuf *buf) static struct scm_narrow_stringbuf * try_narrow_stringbuf (struct scm_wide_stringbuf *buf, size_t start, size_t len) { - if (buf->header.length < start || (buf->header.length - start) > len) + if (buf->header.length < start || (buf->header.length - start) < len) abort (); scm_t_wchar *src = wide_stringbuf_chars (buf);