From 8adc203dedc10c1fed4068f5c6077e4a2f63d82d Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Wed, 26 Aug 2009 18:46:55 +0300 Subject: [PATCH] string-hash and string-ci-hash now return nonnegative fixnums only. --- scheme/last-revision | 2 +- src/ikarus-symbol-table.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scheme/last-revision b/scheme/last-revision index e1d33be..07bef9d 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1847 +1848 diff --git a/src/ikarus-symbol-table.c b/src/ikarus-symbol-table.c index 32e32dd..51f3e42 100644 --- a/src/ikarus-symbol-table.c +++ b/src/ikarus-symbol-table.c @@ -52,7 +52,7 @@ compute_hash(ikptr str){ h = h + (h << 3); h = h ^ (h >> 11); h = h + (h << 15); - return h; + return (h >= 0) ? h : (1 - h); } ikptr