~ chicken-core (chicken-5) 2a685174ce60bccc529c2ca217ca1b24c53a0adc
commit 2a685174ce60bccc529c2ca217ca1b24c53a0adc
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Aug 23 12:10:07 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Tue Aug 23 12:10:07 2011 +0200
fixed bug in reading of octal escape in string literal
diff --git a/library.scm b/library.scm
index c7801b45..37ee3e2f 100644
--- a/library.scm
+++ b/library.scm
@@ -2435,8 +2435,12 @@ EOF
((#\\ #\' #\" #\|)
(loop (##sys#read-char-0 port) (cons c lst)))
(else
- (cond ((char-numeric? c)
- (let ((ch (integer->char (r-usequence "" 2 8))))
+ (cond ((and (char-numeric? c)
+ (char>=? c #\0)
+ (char<=? c #\7))
+ (let ((ch (integer->char
+ (fx+ (fx* (fx- (char->integer c) 48) 64)
+ (r-usequence "" 2 8)))))
(loop (##sys#read-char-0 port) (cons ch lst)) ))
(else
(##sys#read-warning
Trap