From 1a0126ebd30335008238d6412bbb8d726bf53fd0 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 30 Aug 2021 04:37:20 +0300 Subject: [PATCH] do not cut-off one bit when hashing QBitArray fixes QBitArray hash collisions Signed-off-by: Ivailo Monev --- src/core/tools/qhash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tools/qhash.cpp b/src/core/tools/qhash.cpp index 3b4e5285d..afb179fe8 100644 --- a/src/core/tools/qhash.cpp +++ b/src/core/tools/qhash.cpp @@ -79,7 +79,7 @@ uint qHash(const QStringRef &key) uint qHash(const QBitArray &bitArray) { - return hash(reinterpret_cast(bitArray.d.constData()), qMax(0, bitArray.d.size() - 1)); + return hash(reinterpret_cast(bitArray.d.constData()), qMax(0, bitArray.d.size())); } /* -- 2.11.0