Fix extra newline in mdb-sql prompt

A newline appeared after "=> " when readline was not found on the
system.
This commit is contained in:
Evan Miller 2020-12-28 20:11:06 -05:00
parent e2c597f669
commit 31d8bc13aa

View File

@ -68,8 +68,8 @@ char *readline(char *prompt)
char *buf, line[1000];
int i = 0;
puts(prompt);
if (! fgets(line,1000,stdin)) {
fputs(prompt, stdout);
if (!fgets(line, sizeof(line), stdin)) {
return NULL;
}
for (i=strlen(line);i>0;i--) {