From 663979ea6572ec2796edd72f5b56a81c0c445353 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sun, 17 Apr 2022 12:57:21 +0200 Subject: [PATCH] Fix allocation of more memory in the ParseTree.addAllComponents function Signed-off-by: Username404 --- src/headers/parsing/ParseComponents.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index cdf2d91..8d6496b 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -48,7 +48,7 @@ protected: void addAllComponents( const initializer_list& components ) const { - subComponents.reserve(components.size()); + subComponents.reserve(subComponents.size() + components.size()); for (const T& current: components) addComponent(current); } public: