]> gitweb.factorcode.org Git - factor.git/commitdiff
words: prevent zero hashcodes. Fixes #222.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 2 Oct 2011 20:47:33 +0000 (13:47 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 2 Oct 2011 20:49:45 +0000 (13:49 -0700)
core/words/words.factor

index 3fa4baaff817952b54e2e33f2d89d3c3bf4eab80..c791829ede3ed8d2fdca87c4ebb89a4b77a99498 100644 (file)
@@ -169,7 +169,7 @@ M: word reset-word
     ] tri ;
 
 : <word> ( name vocab -- word )
-    2dup [ hashcode ] bi@ bitxor >fixnum (word) dup new-word ;
+    2dup swap ":" glue hashcode >fixnum (word) dup new-word ;
 
 : <uninterned-word> ( name -- word )
     f \ <uninterned-word> counter >fixnum (word)