From 0c949a6b9a8874cdafa56f64bd8650d7b9349133 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 21 Jun 2022 23:56:22 +0200 Subject: lib: Fix reserved size calculation --- src/pastify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pastify.cc b/src/pastify.cc index e3d7d8d7..2047bf5b 100644 --- a/src/pastify.cc +++ b/src/pastify.cc @@ -45,7 +45,7 @@ pastify_string(std::string_view str, bool c1) { auto rv = std::string{}; - rv.reserve(str.size() + 1 + insert_brackets ? 12 : 0); + rv.reserve((str.size() + 1 + insert_brackets) ? 12 : 0); if (insert_brackets) { if (c1) -- cgit v1.2.1