mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix silly crash in HashMap::remove(). r=graydon on IRC, no bug.
--HG-- extra : rebase_source : 25d53309e30bec26f7a93148c9000e1c79431986
This commit is contained in:
parent
c78334cec0
commit
f9a7d4274f
@ -316,7 +316,7 @@ namespace nanojit
|
||||
/** remove k from the map, if it is present. if not, remove()
|
||||
* silently returns */
|
||||
void remove(const K& k) {
|
||||
size_t i = H::hash(k);
|
||||
size_t i = H::hash(k) % nbuckets;
|
||||
Seq<Node>** prev = &buckets[i];
|
||||
for (Seq<Node>* p = buckets[i]; p != NULL; p = p->tail) {
|
||||
if (p->head.key == k) {
|
||||
|
Loading…
Reference in New Issue
Block a user