From b97ff8623d619fcc26823a673d99be65a320be60 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 9 May 2009 14:06:41 -0700 Subject: [PATCH] Fix bug: read-substring wasn't updating the buffer position. --- v7/src/runtime/stringio.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/stringio.scm b/v7/src/runtime/stringio.scm index 000ef8648..0d7bd5cd1 100644 --- a/v7/src/runtime/stringio.scm +++ b/v7/src/runtime/stringio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: stringio.scm,v 14.6 2009/02/04 16:00:45 savannah-arthur Exp $ +$Id: stringio.scm,v 14.7 2009/05/06 08:35:46 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -111,8 +111,11 @@ USA. (define (internal-in/read-substring port string start end) (let ((ss (port/state port))) - (move-chars! (iistate-string ss) (iistate-next ss) (iistate-end ss) - string start end))) + (let ((n + (move-chars! (iistate-string ss) (iistate-next ss) (iistate-end ss) + string start end))) + (set-iistate-next! ss (fix:+ (iistate-next ss) n)) + n))) (define (make-narrow-input-type) (make-string-in-type narrow-in/peek-char -- 2.25.1