From 0c46eab523a3e557b2761ceb71e14e8f2801731f Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 13 Jul 2011 12:52:28 -0400 Subject: [PATCH] Fix unsafe multiplication. original commit: cf04739f93dd2a6e16bd022431a123c1a25865cb --- collects/typed-scheme/types/numeric-predicates.rkt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collects/typed-scheme/types/numeric-predicates.rkt b/collects/typed-scheme/types/numeric-predicates.rkt index a99590fe..4224f3e3 100644 --- a/collects/typed-scheme/types/numeric-predicates.rkt +++ b/collects/typed-scheme/types/numeric-predicates.rkt @@ -9,7 +9,6 @@ ;; we assume indexes are 2 bits shorter than fixnums ;; We're generating a reference to fixnum? rather than calling it, so ;; we're safe from fixnum size issues on different platforms. -(define (index? x) - (and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (unsafe-fx* x 4)))) +(define (index? x) (and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (* x 4)))) (define exact-rational? (conjoin rational? exact?))