assert(tal_count(log) > 0) in log_to_json(...)

This commit is contained in:
practicalswift 2018-01-02 23:29:42 +01:00 committed by Rusty Russell
parent 7b80e5b66c
commit d02b890b55

View file

@ -130,6 +130,7 @@ static void log_to_json(unsigned int skipped,
json_add_time(info->response, "time", diff.ts);
json_add_string(info->response, "source", prefix);
if (level == LOG_IO) {
assert(tal_count(log) > 0);
if (log[0])
json_add_string(info->response, "direction", "IN");
else