diff options
author | Steve Bennett <steveb@workware.net.au> | 2021-12-13 16:43:06 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2021-12-13 21:04:18 +1000 |
commit | 24b234543c7322d2dd20339b45367fa3f4c53495 (patch) | |
tree | b3353c74bbd4104442438c00ebf84573da1a1b98 /examples.api | |
parent | ececa1d3b24dc4298b831675f597a4a84a14e69a (diff) | |
download | jimtcl-24b234543c7322d2dd20339b45367fa3f4c53495.zip jimtcl-24b234543c7322d2dd20339b45367fa3f4c53495.tar.gz jimtcl-24b234543c7322d2dd20339b45367fa3f4c53495.tar.bz2 |
dict: Fix possible duplicate entries when setting
Due to the way hash collisions are managed it is possible
to have a sequence where an entry is removed and then another
entry is replaced, however the replacement adds an additional
entry instead of updating the existing entry.
Can be reproduced like this as there is a hash collision between
these two keys:
dict set d 0,13 X
dict set d 8,4 Y
dict unset d 0,13
dict set d 8,4 Z
Should result in one entry in the dictionary, but instead ends with two.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'examples.api')
0 files changed, 0 insertions, 0 deletions