mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-22 07:09:18 +02:00
checking for NULL values in hash_one
This commit is contained in:
parent
68a95bc366
commit
fd2bab331a
1 changed files with 28 additions and 26 deletions
|
@ -53,6 +53,7 @@ static sexp_uint_t hash_one (sexp ctx, sexp obj, sexp_uint_t bound, sexp_sint_t
|
|||
sexp t, *p;
|
||||
char *p0;
|
||||
loop:
|
||||
if (obj) {
|
||||
#if SEXP_USE_FLONUMS
|
||||
if (sexp_flonump(obj))
|
||||
acc ^= (sexp_sint_t) sexp_flonum_value(obj);
|
||||
|
@ -86,6 +87,7 @@ static sexp_uint_t hash_one (sexp ctx, sexp obj, sexp_uint_t bound, sexp_sint_t
|
|||
} else {
|
||||
acc ^= (sexp_uint_t)obj;
|
||||
}
|
||||
}
|
||||
return (bound ? acc % bound : acc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue