forked from qt-creator/qt-creator
Utils: Fix splitting in ChannelBuffer::takeFirstLine()
Escape the '\r' Change-Id: I8cee40dc4a65f893f1a11c7cf066777498c37339 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -875,7 +875,7 @@ QString ChannelBuffer::linesRead()
|
||||
// Check for first complete line inside the rawData and return it, removing the line from the buffer
|
||||
Utils::optional<QString> ChannelBuffer::takeFirstLine()
|
||||
{
|
||||
const int firstLineEnd = qMax(rawData.indexOf('\n'), rawData.indexOf('r'));
|
||||
const int firstLineEnd = qMax(rawData.indexOf('\n'), rawData.indexOf('\r'));
|
||||
if (firstLineEnd == -1)
|
||||
return Utils::nullopt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user