Skip to content

LinearProbingHashTable::insertKey() gets into infinite loop when a resize is needed #2

Open
saq10002 opened this issue Oct 15, 2014 · 0 comments
Labels

Comments

@saq10002
Copy link
Owner

When needGrow() is true, the code does "continue" whereas it should have done "break".

                        // see if we need to size up after this insertion
                            if (this->needGrow(_population+1)){
                                // current bucket is not appropriate anymore under new size
                                // exit the do{} loop, after which we grow and try again
                                continue; // <<<<<<< bug
                            }
Sign in to join this conversation on GitHub.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant