summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandReturnObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandReturnObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandReturnObject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp
index ddb783bca57..896ad2b7e84 100644
--- a/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -106,11 +106,12 @@ CommandReturnObject::AppendWarningWithFormat (const char *format, ...)
void
CommandReturnObject::AppendMessage (const char *in_string, int len)
{
- if (!in_string)
+ if (!in_string || len == 0)
return;
if (len < 0)
- len = ::strlen (in_string);
- GetOutputStream().Printf("%*.*s\n", len, len, in_string);
+ GetOutputStream().Printf("%s\n", in_string);
+ else
+ GetOutputStream().Printf("%*.*s\n", len, len, in_string);
}
void
OpenPOWER on IntegriCloud