Fix hashtable crash
parent
6140178393
commit
e8ddc09ab5
|
@ -34,7 +34,7 @@ TUPLE: tombstone ;
|
|||
>r >r [ key@ ] 2keep pick -1 > r> r> if ; inline
|
||||
|
||||
: <hash-array> ( n -- array )
|
||||
1+ 4 * ((empty)) <array> ; inline
|
||||
>fixnum 1+ 4 * ((empty)) <array> ; inline
|
||||
|
||||
: init-hash ( hash -- )
|
||||
0 over set-hash-count 0 swap set-hash-deleted ;
|
||||
|
|
|
@ -202,3 +202,6 @@ H{ } clone "cache-test" set
|
|||
! Resource leak...
|
||||
H{ } "x" set
|
||||
100 [ drop "x" get clear-hash ] each
|
||||
|
||||
! Crash discovered by erg
|
||||
[ t ] [ 3/4 <hashtable> dup clone = ] unit-test
|
||||
|
|
Loading…
Reference in New Issue