wallet: Fix an off by one error in dev-listaddrs

Reported-By: @Xian001
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2018-02-23 18:56:18 +01:00 committed by Rusty Russell
parent 73fab9e345
commit 7c8883ae7d

View File

@ -421,7 +421,7 @@ static void json_listaddrs(struct command *cmd,
json_object_start(response, NULL);
json_array_start(response, "addresses");
for (s64 keyidx = 0; keyidx < bip32_max_index; keyidx++) {
for (s64 keyidx = 0; keyidx <= bip32_max_index; keyidx++) {
if(keyidx == BIP32_INITIAL_HARDENED_CHILD){
break;