~ chicken-core (master) e4f29582c4176bea857c3a8c5c677c808053363b


commit e4f29582c4176bea857c3a8c5c677c808053363b
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Sep 1 13:57:24 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Sep 1 13:57:24 2026 +0200

    fix type of returned object in C_a_i_random_real
    
    Report and fix by "crzcrz"

diff --git a/runtime.c b/runtime.c
index 4c0c3925..5fdfa471 100644
--- a/runtime.c
+++ b/runtime.c
@@ -13560,7 +13560,7 @@ C_a_i_random_real(C_word **ptr, C_word n) {
   while (C_unlikely((significand = random64()) == 0)) {
     exponent -= 64;
     if (C_unlikely(exponent < -1074))
-      return 0;
+      return C_flonum(ptr, 0.0);
   }
 
   shift = clz64(significand);
Trap