guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 03/06: Fix bad-utf8-len bug.


From: Andy Wingo
Subject: [Guile-commits] 03/06: Fix bad-utf8-len bug.
Date: Tue, 10 May 2016 13:41:18 +0000 (UTC)

wingo pushed a commit to branch wip-port-refactor
in repository guile.

commit 9c02ede07e0f614440ec4741ce925ef00a1a7e1d
Author: Andy Wingo <address@hidden>
Date:   Tue May 10 15:37:11 2016 +0200

    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 ad9c088..e672b2c 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]