summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-05-10 15:37:11 +0200
committerAndy Wingo <wingo@pobox.com>2016-05-10 15:37:11 +0200
commit9c02ede07e0f614440ec4741ce925ef00a1a7e1d (patch)
tree514444b9579e5b9dde2eb2b5662632f15e8cee86
parent0dd18191bc864a53230963ceb485d7815e058006 (diff)
downloadguile-9c02ede07e0f614440ec4741ce925ef00a1a7e1d.tar.gz
Fix bad-utf8-len bug.
* module/ice-9/ports.scm (bad-utf8-len): Fix bug.
-rw-r--r--module/ice-9/ports.scm2
1 files changed, 1 insertions, 1 deletions
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)