From 9c02ede07e0f614440ec4741ce925ef00a1a7e1d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 10 May 2016 15:37:11 +0200 Subject: [PATCH] Fix bad-utf8-len bug. * module/ice-9/ports.scm (bad-utf8-len): Fix bug. --- module/ice-9/ports.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ice-9/ports.scm b/module/ice-9/ports.scm index ad9c088a4..e672b2c9b 100644 --- a/module/ice-9/ports.scm +++ b/module/ice-9/ports.scm @@ -360,7 +360,7 @@ interpret its input and output." (define (bad-utf8-len bv cur buffering first-byte) (define (ref n) - (bytevector-u8-ref bv (+ cur 1))) + (bytevector-u8-ref bv (+ cur n))) (cond ((< first-byte #x80) 0) ((<= #xc2 first-byte #xdf)