summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/StringPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/DataFormatters/StringPrinter.cpp')
-rw-r--r--lldb/source/DataFormatters/StringPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp
index 60c246f8341..27f5b51f7d2 100644
--- a/lldb/source/DataFormatters/StringPrinter.cpp
+++ b/lldb/source/DataFormatters/StringPrinter.cpp
@@ -382,6 +382,8 @@ DumpUTFBufferToStream (ConversionResult (*ConvertFunction) (const SourceDataType
utf8_data_ptr = (UTF8*)utf8_data_buffer_sp->GetBytes();
utf8_data_end_ptr = utf8_data_ptr + utf8_data_buffer_sp->GetByteSize();
ConvertFunction ( &data_ptr, data_end_ptr, &utf8_data_ptr, utf8_data_end_ptr, lenientConversion );
+ if (false == zero_is_terminator)
+ utf8_data_end_ptr = utf8_data_ptr;
utf8_data_ptr = (UTF8*)utf8_data_buffer_sp->GetBytes(); // needed because the ConvertFunction will change the value of the data_ptr
}
else
OpenPOWER on IntegriCloud