fixing bug in string->number for hex strings (issue #21)

This commit is contained in:
Alex Shinn 2009-12-29 23:45:40 +09:00
parent b77d102a70
commit c94490872c

View file

@ -486,7 +486,7 @@
(if (char-numeric? ch) (if (char-numeric? ch)
(- (char->integer ch) (char->integer #\0)) (- (char->integer ch) (char->integer #\0))
(and (<= 65 (char->integer (char-upcase ch)) 70) (and (<= 65 (char->integer (char-upcase ch)) 70)
(- (char->integer (char-upcase ch)) 65)))) (- (char->integer (char-upcase ch)) 55))))
(define (number->string n . o) (define (number->string n . o)
(if (if (null? o) #t (eq? 10 (car o))) (if (if (null? o) #t (eq? 10 (car o)))