Closed GoogleCodeExporter closed 9 years ago
A patch for this can be like:
diff --git a/boot/baselib/misc.scm b/boot/baselib/misc.scm
index bf5f60e..6318f89 100644
--- a/boot/baselib/misc.scm
+++ b/boot/baselib/misc.scm
@@ -3,8 +3,8 @@
(map string->list str2)))
(define (exact-integer-sqrt k)
- (unless (and (integer? k) (>= k 0))
- (assertion-violation 'exact-integer-sqrt "exact integer number required"
(list k)))
+ (unless (and (integer? k) (exact? k) (>= k 0))
+ (assertion-violation 'exact-integer-sqrt "exact non-negative integer
required" (list k)))
(let* ([s (exact (truncate (sqrt k)))]
[r (- k (* s s))])
(values s r)))
Original comment by tabe.fix...@gmail.com
on 19 Jun 2010 at 4:09
Thanks. Fixed.
Original comment by hige...@gmail.com
on 20 Jun 2010 at 7:14
I think the following fix lacks the exactness check:
http://github.com/higepon/mosh/commit/4f1b3c208311211f18dec2e99448c387cfc1630f
Original comment by tabe.fix...@gmail.com
on 21 Jun 2010 at 2:05
You're right about this.
Fixed. Thanks.
Original comment by hige...@gmail.com
on 22 Jun 2010 at 12:58
Original issue reported on code.google.com by
tabe.fix...@gmail.com
on 19 Jun 2010 at 3:20