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)