Interpret empty input as intend to exit.

This commit is contained in:
Oliver Schmidt 2018-08-03 13:58:46 +02:00
parent fc61ee5358
commit 66ac29285b

View File

@ -187,7 +187,7 @@ char *get_argument(char arg, const char *name, const char *history,
snprintf(prompt, sizeof(prompt), "%s? ", name);
val = linenoise(prompt);
if (!val)
if (!val || !*val)
{
putchar('\n');
exit(EXIT_FAILURE);