From b3cc2b2cb5769503c1e63bad1a50cfae532a539d Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Thu, 29 Jul 2021 20:57:03 -0700 Subject: [PATCH] :bug: forgot to resize to 0 of string cache --- src/log.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/log.cpp b/src/log.cpp index e664c7b..ec2e8b6 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -14,6 +14,7 @@ std::string Log::GetLogs() noexcept { if (log_flag.GetChangeState() && data.size()) //if there are changes { + log_snapshot.resize(0); //re-generate snapshot size_t predicted_size = ((59 + (2 * max_name_size)) * data.size()) + 1; if (log_snapshot.capacity() < predicted_size)