Added beep when user chooses an invalid selection (when selections are enabled)

modified:   src/nms.c
This commit is contained in:
Brian Barto 2016-04-20 18:33:51 -04:00
parent 53f3835195
commit 125cf82b42

View File

@ -233,8 +233,10 @@ char nms_exec(NmsArgs *args) {
if (isatty(STDIN_FILENO)) { if (isatty(STDIN_FILENO)) {
ret = getch(); ret = getch();
if (args->return_opts != NULL && strlen(args->return_opts) > 0) if (args->return_opts != NULL && strlen(args->return_opts) > 0)
while (index(args->return_opts, ret) == NULL) while (index(args->return_opts, ret) == NULL) {
beep();
ret = getch(); ret = getch();
}
} else } else
sleep(2); sleep(2);