mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-05 18:52:09 +00:00
Return -1 if no input is detected from the menu to prevent it being interpreted as a 0.
This commit is contained in:
parent
8d39311613
commit
fc46d57d62
2
main.c
2
main.c
@ -4309,6 +4309,8 @@ static char *curses_input(const char *query)
|
|||||||
leaveok(logwin, false);
|
leaveok(logwin, false);
|
||||||
wlogprint("%s: ", query);
|
wlogprint("%s: ", query);
|
||||||
wgetnstr(logwin, input, 255);
|
wgetnstr(logwin, input, 255);
|
||||||
|
if (!strlen(input))
|
||||||
|
strcpy(input, "-1");
|
||||||
leaveok(logwin, true);
|
leaveok(logwin, true);
|
||||||
noecho();
|
noecho();
|
||||||
return input;
|
return input;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user