diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qhash.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index ecbdfe4fb8..49c9ce1d41 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -500,8 +500,9 @@ struct Data bool resized = numBuckets != other.numBuckets; size_t nSpans = (numBuckets + Span::LocalBucketMask) / Span::NEntries; spans = new Span[nSpans]; + size_t otherNSpans = (other.numBuckets + Span::LocalBucketMask) / Span::NEntries; - for (size_t s = 0; s < nSpans; ++s) { + for (size_t s = 0; s < otherNSpans; ++s) { const Span &span = other.spans[s]; for (size_t index = 0; index < Span::NEntries; ++index) { if (!span.hasNode(index)) |