diff --git a/src/apps/haiku-depot/List.h b/src/apps/haiku-depot/List.h index eb229aadcd..02ce67c614 100644 --- a/src/apps/haiku-depot/List.h +++ b/src/apps/haiku-depot/List.h @@ -159,9 +159,10 @@ public: } int32 nextIndex = index + 1; - if ((int32)fCount > nextIndex) + if ((int32)fCount > nextIndex) { memcpy(fItems + index, fItems + nextIndex, (fCount - nextIndex) * sizeof(ItemType)); + } fCount--; }