fgets error

This commit is contained in:
Jim Monte 2020-04-25 19:24:07 +02:00 committed by Holger Vogt
parent 07489872b1
commit 983cb4896c
1 changed files with 1 additions and 2 deletions

View File

@ -1390,8 +1390,7 @@ com_edit(wordlist *wl)
fprintf(cp_out, "run circuit? ");
fflush(cp_out);
fgets(buf, BSIZE_SP, stdin);
if (buf[0] != 'n') {
if (fgets(buf, BSIZE_SP, stdin) == (char *) NULL || buf[0] != 'n') {
fprintf(cp_out, "running circuit\n");
com_run(NULL);
}