~ chicken-core (chicken-5) 4ca6d3d664025866efd1b206ddb6ea20bbfb87e8


commit 4ca6d3d664025866efd1b206ddb6ea20bbfb87e8
Author:     LemonBoy <thatlemon@gmail.com>
AuthorDate: Mon May 1 13:27:06 2017 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Wed May 3 08:34:13 2017 +1200

    Make fx*? aware of non-fixnum arguments
    
    This brings it in line with the other overflow-aware operators.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/runtime.c b/runtime.c
index e85b397f..febf4d6c 100644
--- a/runtime.c
+++ b/runtime.c
@@ -12499,6 +12499,8 @@ C_regparm C_word C_fcall C_i_o_fixnum_times(C_word n1, C_word n2)
   C_uword c = 1UL<<31UL;
 #endif
 
+  if((n1 & C_FIXNUM_BIT) == 0 || (n2 & C_FIXNUM_BIT) == 0) return C_SCHEME_FALSE;
+
   if((n1 & C_INT_SIGN_BIT) == (n2 & C_INT_SIGN_BIT)) --c;
 
   x1 = C_unfix(n1);
Trap