From 87cd5ab0dc5e9f2657f25109d63de3f619bd787d Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Mon, 5 Oct 2020 18:13:15 +0200 Subject: [PATCH] fixed the grow function --- include/gp/vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gp/vector.hpp b/include/gp/vector.hpp index fe9cdb4..05e9d27 100644 --- a/include/gp/vector.hpp +++ b/include/gp/vector.hpp @@ -117,7 +117,7 @@ namespace gp{ } bool grow() { - if(sz == cap) return reserve(sz + (sz >> 1)); + if(sz == cap) return reserve(1 + sz + (sz >> 1)); return true; }