mes: Bugifx for number->string radix > 10.
* module/mes/scm.mes (number->string): Bugfix for `10' -> hex/radix > 10.
This commit is contained in:
parent
21aff4c7ad
commit
bdd160241b
|
@ -252,7 +252,7 @@
|
||||||
(sign (if (< n 0) '(#\-) '())))
|
(sign (if (< n 0) '(#\-) '())))
|
||||||
(let loop ((n (abs n)) (lst '()))
|
(let loop ((n (abs n)) (lst '()))
|
||||||
(let* ((i (remainder n radix))
|
(let* ((i (remainder n radix))
|
||||||
(lst (cons (integer->char (+ i (if (<= i 10) (char->integer #\0)
|
(lst (cons (integer->char (+ i (if (< i 10) (char->integer #\0)
|
||||||
(- (char->integer #\a) 10)))) lst))
|
(- (char->integer #\a) 10)))) lst))
|
||||||
(n (quotient n radix)))
|
(n (quotient n radix)))
|
||||||
(if (= 0 n) (list->string (append sign lst))
|
(if (= 0 n) (list->string (append sign lst))
|
||||||
|
|
Loading…
Reference in a new issue