mike121 pushed a commit to branch wip-mingw
in repository guile.
commit 46bb667f203a842e2cc574054487cd05f4ce8977
Author: Michael Gran <[email protected]>
AuthorDate: Sun Oct 16 01:24:48 2022 -0700
MinGW 64: fixes hash out-of-range error for 64-bit negative numbers
* libguile/hash.c (scm_raw_ihash): modified
---
libguile/hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/hash.c b/libguile/hash.c
index af5772892..d7c562959 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -301,7 +301,7 @@ scm_raw_ihash (SCM obj, size_t depth)
SCM n = SCM_I_MAKINUM (SCM_MOST_POSITIVE_FIXNUM);
if (scm_is_inexact (obj))
obj = scm_inexact_to_exact (obj);
- return scm_raw_ihashq (scm_to_ulong (scm_modulo (obj, n)));
+ return scm_raw_ihashq (scm_to_uintptr_t (scm_modulo (obj, n)));
}
else
return scm_i_string_hash (scm_number_to_string (obj, scm_from_int
(10)));