Skip to content

Commit

Permalink
Flush yes/no prompt before reading response
Browse files Browse the repository at this point in the history
musl libc does not flush output streams before reading input, so
the prompt does not get printed unless it is flushed explicitly.
  • Loading branch information
michaelforney authored and jperkin committed Apr 16, 2020
1 parent 24fee70 commit 9c7c815
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ check_yesno(uint8_t default_answer)
printf(MSG_PROCEED_YES);
else
printf(MSG_PROCEED_NO);
fflush(stdout);

c = tolower(getchar());

Expand Down

0 comments on commit 9c7c815

Please sign in to comment.