From 274ca38fd1de0bd5e41999d5c1d665aeea62b034 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 18 Apr 2013 15:52:57 +0200 Subject: [PATCH] BOpenHashTable::Clear(): Set fItemCount to 0 If not empty, the count would afterwards be out of sync with reality. --- headers/private/kernel/util/OpenHashTable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headers/private/kernel/util/OpenHashTable.h b/headers/private/kernel/util/OpenHashTable.h index be711c4ac8..a2af3aaf37 100644 --- a/headers/private/kernel/util/OpenHashTable.h +++ b/headers/private/kernel/util/OpenHashTable.h @@ -230,7 +230,7 @@ public: */ ValueType* Clear(bool returnElements = false) { - if (this->fItemCount == 0) + if (fItemCount == 0) return NULL; ValueType* result = NULL; @@ -256,6 +256,7 @@ public: } memset(this->fTable, 0, sizeof(ValueType*) * this->fTableSize); + fItemCount = 0; return result; }