Browse Source

Return -1 if no input is detected from the menu to prevent it being interpreted as a 0.

Con Kolivas 14 years ago
parent
commit
fc46d57d62
1 changed files with 2 additions and 0 deletions
  1. 2 0
      main.c

+ 2 - 0
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;