summaryrefslogtreecommitdiff
path: root/src/oldpool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/oldpool.h')
-rw-r--r--src/oldpool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/oldpool.h b/src/oldpool.h
index d1301bb2e..38a373474 100644
--- a/src/oldpool.h
+++ b/src/oldpool.h
@@ -253,7 +253,7 @@ protected:
*/
static T *AllocateRaw(uint &first)
{
- uint last_minus_one = Tpool->GetSize();
+ uint last_minus_one = Tpool->GetSize() - 1;
for (T *t = Tpool->Get(first); t != NULL; t = (t->index < last_minus_one) ? Tpool->Get(t->index + 1U) : NULL) {
if (!t->IsValid()) {