round number before converting to exact

This commit is contained in:
Leon Henrik Plickat
2023-11-25 20:59:25 +01:00
parent 997bf072e4
commit 23e160f2d0

View File

@@ -52,7 +52,7 @@ static bool scm2uint(uint32_t *x, SCM s)
{
if ( scm_is_false(scm_number_p(s)) == 1 )
return false;
*x = scm_to_uint32(scm_inexact_to_exact(s));
*x = scm_to_uint32(scm_inexact_to_exact(scm_round_number(s)));
return true;
}