From 742396c32ea59284bfab4e5c076c42ad103da08f Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sat, 29 May 2021 20:28:39 -0700 Subject: [PATCH] Serialize dont log 0 amount --- include/log.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/log.hpp b/include/log.hpp index 5341036..1b50a3b 100644 --- a/include/log.hpp +++ b/include/log.hpp @@ -31,7 +31,7 @@ struct Log Json::Value Serialize() const { Json::Value res; - for (uint32_t i = 0; i < end; ++i) + for (uint32_t i = 0; i < end && data[i].amount; ++i) { res[i]["to"] = data[i].to; res[i]["from"] = data[i].from;