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;