~ chicken-core (master) caaf3a66921471117152bd9c6c443f737e218dac
commit caaf3a66921471117152bd9c6c443f737e218dac
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Sep 1 13:41:15 2026 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Tue Sep 1 13:41:15 2026 +0200
number-comparison of cplx + bignum uses wrong test
Report and fix by "crzcrz".
diff --git a/runtime.c b/runtime.c
index 3cfc32c9..0bd4992c 100644
--- a/runtime.c
+++ b/runtime.c
@@ -9777,7 +9777,7 @@ static C_word basic_cmp(C_word x, C_word y, char *loc, int eqp)
} else if (C_immediatep(y)) {
barf(C_BAD_ARGUMENT_TYPE_NO_NUMBER_ERROR, loc, y);
} else if (C_block_header(y) == C_FLONUM_TAG ||
- C_truep(C_bignump(x)) ||
+ C_truep(C_bignump(y)) ||
C_block_header(y) == C_RATNUM_TAG) {
return C_SCHEME_FALSE;
} else if (C_block_header(y) == C_CPLXNUM_TAG) {
Trap