From 9fff2ecb3f792cc863d43d0bde7d43c7ebf72ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 19 Jan 2014 23:45:41 +0100 Subject: [PATCH] List: Fixed off-by-one check in Add(). Of course we can add right at the end... --- src/apps/haiku-depot/List.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/haiku-depot/List.h b/src/apps/haiku-depot/List.h index 68ee613b88..92d3adf0c4 100644 --- a/src/apps/haiku-depot/List.h +++ b/src/apps/haiku-depot/List.h @@ -121,7 +121,7 @@ public: inline bool Add(const ItemType& copyFrom, int32 index) { - if (index < 0 || index >= (int32)fCount) + if (index < 0 || index > (int32)fCount) return false; if (!_Resize(fCount + 1))