From 2880a2e3db2a75d1c6d6abeb3cd25312ab08ff55 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sun, 11 Jan 2015 02:46:45 +0100 Subject: [PATCH] add break condition to xpubaddrgen --- tools/xpubaddrgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xpubaddrgen.c b/tools/xpubaddrgen.c index 9830d6fa4d..42f87826fc 100644 --- a/tools/xpubaddrgen.c +++ b/tools/xpubaddrgen.c @@ -29,7 +29,7 @@ int main(void) uint32_t jobid, change, from, to; int r; for (;;) { - fgets(line, sizeof(line), stdin); + if (!fgets(line, sizeof(line), stdin)) break; r = sscanf(line, "%u %s %u %u %u\n", &jobid, xpub, &change, &from, &to); if (r < 1) { printf("error\n");