From fc46d57d626e32c20f4791de1edd0d80b0c6d46d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 28 Aug 2011 22:45:33 +1000 Subject: [PATCH] Return -1 if no input is detected from the menu to prevent it being interpreted as a 0. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 15409500..ff8220ee 100644 --- a/main.c +++ b/main.c @@ -4309,6 +4309,8 @@ static char *curses_input(const char *query) leaveok(logwin, false); wlogprint("%s: ", query); wgetnstr(logwin, input, 255); + if (!strlen(input)) + strcpy(input, "-1"); leaveok(logwin, true); noecho(); return input;