You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
779 B

  1. From 5542b160fa73e5e81e83c2d8dd1b79c3023094ee Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Mon, 7 Oct 2019 15:36:31 -0700
  4. Subject: [PATCH 2/4] support: Flush cout in GetYN
  5. uClibc++ does not implicitly flush cout before getline.
  6. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  7. ---
  8. support.cc | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/support.cc b/support.cc
  11. index d47965a..5ab8a23 100644
  12. --- a/support.cc
  13. +++ b/support.cc
  14. @@ -101,7 +101,7 @@ char GetYN(void) {
  15. do {
  16. if ( again ) { cout << "Your option? " ; }
  17. again = 1 ;
  18. - cout << "(Y/N): ";
  19. + cout << "(Y/N): " << flush;
  20. line = ReadString();
  21. response = toupper(line[0]);
  22. } while ((response != 'Y') && (response != 'N'));
  23. --
  24. 2.17.1