Return an empty string rather than an error at EOF.
This commit is contained in:
parent
6f321c74d2
commit
52b026c0e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77723
@ -194,9 +194,11 @@ static char *read_string(int echo, const char *prompt)
|
||||
|
||||
return input; /* return malloc()ed string */
|
||||
} else if (nc == 0) { /* Ctrl-D */
|
||||
char *input;
|
||||
|
||||
D(("user did not want to type anything"));
|
||||
fprintf(stderr, "\n");
|
||||
break;
|
||||
input = x_strdup("");
|
||||
return input; /* return malloc()ed string */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user