From 66b200be27bcca9f4e9729564b7b6893351b2bf9 Mon Sep 17 00:00:00 2001 From: William Katz Date: Mon, 12 Jul 2021 17:22:41 -0700 Subject: [PATCH] :bug: empty log responds with ']' --- src/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.cpp b/src/log.cpp index 6915540..c0fed03 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -21,7 +21,7 @@ void Log::AddTrans(const Transaction &t) noexcept const std::string &Log::GetLogs() noexcept { - if (log_flag.GetChangeState()) //if there are changes + if (log_flag.GetChangeState() && data.size()) //if there are changes { //re-generate snapshot //({\"amount\":1,\"from\":\"\",\"time\":1625943626,\"to\":\"\"}, + (2*max_name_size)+10+10) * # of logs) + 1