summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-22 08:37:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-06-22 08:37:01 +0000
commit84a636fc92b1f3cbb665195dbfb6a3cc27249aa8 (patch)
tree7eda004c33e4ae9aa4fc4429b5121fe90c00924e /st.c
parent6f6ae5db94c267a4765f035d60343a0e4e8b3ad2 (diff)
* st.c (new_size): a bug in bin_pos calculation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index fcb20ed41c..849ad1a3bf 100644
--- a/st.c
+++ b/st.c
@@ -65,7 +65,7 @@ static void rehash();
#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
-#define do_hash_bin(key,table) (do_hash(key, table)&(table)->num_bins)
+#define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins)
/*
* MINSIZE is the minimum size of a dictionary.