diff options
Diffstat (limited to 'tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp')
-rw-r--r-- | tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp index 46002dd326..5e75f7db3c 100644 --- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp +++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp @@ -37,7 +37,9 @@ int main(int, char **argv) fflush(stdout); // wait for a newline - fgets(buf, sizeof buf, stdin); + const char *result = fgets(buf, sizeof buf, stdin); + if (result != buf) + return -1; puts(msg); fflush(stdout); |