mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Fix extra newline in mdb-sql prompt
A newline appeared after "=> " when readline was not found on the system.
This commit is contained in:
parent
e2c597f669
commit
31d8bc13aa
@ -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--) {
|
||||
|
Loading…
Reference in New Issue
Block a user