From 0bcad1289ee48ffeb10c80b5b8216743efd53cd9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Jan 2019 14:29:27 +1030 Subject: [PATCH] bolt11: fix encoding of routes of length > 1. We don't do this yet, so it went unnoticed. Signed-off-by: Rusty Russell --- common/bolt11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bolt11.c b/common/bolt11.c index 6f8285714..7c0f4c4b6 100644 --- a/common/bolt11.c +++ b/common/bolt11.c @@ -843,7 +843,7 @@ static void encode_r(u5 **data, const struct route_info *r) u8 *rinfo = tal_arr(NULL, u8, 0); for (size_t i = 0; i < tal_count(r); i++) - towire_route_info(&rinfo, r); + towire_route_info(&rinfo, &r[i]); push_field(data, 'r', rinfo, tal_count(rinfo) * CHAR_BIT); tal_free(rinfo);