summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/IOHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/IOHandler.cpp')
-rw-r--r--lldb/source/Core/IOHandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index f9e03d10c5c..0a56b13ef0b 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -409,7 +409,10 @@ IOHandlerEditline::GetLine (std::string &line)
while (!done)
{
if (fgets(buffer, sizeof(buffer), in) == NULL)
- done = true;
+ {
+ if (feof(in))
+ done = true;
+ }
else
{
got_line = true;
OpenPOWER on IntegriCloud