~ chicken-core (master) dcf214a8a9647b2c4fe1a1404bc96cb5733160b5
commit dcf214a8a9647b2c4fe1a1404bc96cb5733160b5
Author: Felix Winkelmann <felix.winkelmann@bevuta.com>
AuthorDate: Sun Sep 13 23:05:14 2026 +0200
Commit: Felix Winkelmann <felix.winkelmann@bevuta.com>
CommitDate: Sun Sep 13 23:05:14 2026 +0200
avoid int overflow
diff --git a/runtime.c b/runtime.c
index 74f6b9cd..efa5772d 100644
--- a/runtime.c
+++ b/runtime.c
@@ -7375,7 +7375,7 @@ C_regparm C_word C_i_check_range_2(C_word i, C_word f, C_word t, C_word loc)
barf(C_BAD_ARGUMENT_TYPE_NO_FIXNUM_ERROR, NULL, i);
}
- int index = C_unfix(i);
+ C_word index = C_unfix(i);
if(index < C_unfix(f)) {
error_location = loc;
@@ -7398,7 +7398,7 @@ C_regparm C_word C_i_check_range_including_2(C_word i, C_word f, C_word t, C_wor
barf(C_BAD_ARGUMENT_TYPE_NO_FIXNUM_ERROR, NULL, i);
}
- int index = C_unfix(i);
+ C_word index = C_unfix(i);
if(index < C_unfix(f)) {
error_location = loc;
Trap