diff options
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 16a550ba1..342551247 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1360,8 +1360,7 @@ int GUIAction::terminalcommand(std::string arg) } else { // Try to read output memset(line, 0, sizeof(line)); - bytes_read = read(fd, line, sizeof(line)); - if (bytes_read > 0) + if(fgets(line, sizeof(line), fp) != NULL) gui_print("%s", line); // Display output else keep_going = 0; // Done executing |