Fix bug in user prompt where line was not flushed on negative response

This commit is contained in:
senhuang42 2020-08-26 11:57:38 -04:00
parent a73e131f10
commit fed7e7850b

View File

@ -624,9 +624,10 @@ FIO_openDstFile(FIO_prefs_t* const prefs,
{ int ch = getchar();
if ((ch!='Y') && (ch!='y')) {
DISPLAY(" not overwritten \n");
/* flush rest of input line */
while ((ch!=EOF) && (ch!='\n')) ch = getchar();
return NULL;
}
/* flush rest of input line */
while ((ch!=EOF) && (ch!='\n')) ch = getchar();
} }
/* need to unlink */