diff options
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibCore/IODevice.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Libraries/LibCore/IODevice.cpp b/Libraries/LibCore/IODevice.cpp index 63079c5721..81d759afd0 100644 --- a/Libraries/LibCore/IODevice.cpp +++ b/Libraries/LibCore/IODevice.cpp @@ -200,8 +200,7 @@ ByteBuffer IODevice::read_line(size_t max_size) Vector<u8> new_buffered_data; new_buffered_data.append(m_buffered_data.data() + line_index, m_buffered_data.size() - line_index); m_buffered_data = move(new_buffered_data); - line[line_index] = '\0'; - line.trim(line_index + 1); + line.trim(line_index); return line; } } |