From d4bb85a80ee3eb76d803e3cd04de2ccdf0379415 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Thu, 9 Jun 2016 17:19:29 +0100 Subject: [PATCH] Allow enabling IP info and ASN lookup from the curses interface Toggling IP info and ASN lookup from the curses interface can be done using 'z' or 'y'. But it was only allowed if it was first enabled via a command-line switch (either -z or -y). --- select.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/select.c b/select.c index 62478f4..b2c4349 100644 --- a/select.c +++ b/select.c @@ -240,15 +240,12 @@ void select_loop(void) { break; #ifdef IPINFO case ActionII: - if (ipinfo_no >= 0) { - ipinfo_no++; - if (ipinfo_no > ipinfo_max) - ipinfo_no = 0; - } + ipinfo_no++; + if (ipinfo_no > ipinfo_max) + ipinfo_no = 0; break; case ActionAS: - if (ipinfo_no >= 0) - ipinfo_no = ipinfo_no?0:ipinfo_max; + ipinfo_no = ipinfo_no?0:ipinfo_max; break; #endif -- 2.47.3