aports/main/truecrypt/flush-stdout.patch
Timo Teräs 0c1e8d47e8 main/truecrypt: flush stdout before reading stdin
stdout is line-buffered, and needs to be flushed explicitly
in musl. fixes #6992
2017-03-10 14:18:19 +02:00

12 lines
421 B
Diff

--- truecrypt-7.1a-source/Main/TextUserInterface.cpp.orig 2017-03-10 14:07:32.880449234 +0200
+++ truecrypt-7.1a-source/Main/TextUserInterface.cpp 2017-03-10 14:11:28.843128874 +0200
@@ -1247,6 +1247,8 @@
if (!TextInputStream.get() || feof (stdin) || ferror (stdin))
throw UserAbort (SRC_POS);
+ wcout.flush();
+
line = TextInputStream->ReadLine();
if (ferror (stdin) || (line.empty() && feof (stdin)))