diff --git a/rpcs3/rpcs3qt/log_frame.cpp b/rpcs3/rpcs3qt/log_frame.cpp index 7e80a89068..e6e28aa744 100644 --- a/rpcs3/rpcs3qt/log_frame.cpp +++ b/rpcs3/rpcs3qt/log_frame.cpp @@ -524,7 +524,7 @@ void log_frame::UpdateUI() while (str_index < m_tty_buf.size()) { - buf_line = m_tty_buf.substr(str_index, m_tty_buf.find_first_of('\n')); + buf_line.assign(std::string_view(m_tty_buf).substr(str_index, m_tty_buf.find_first_of('\n', str_index) - str_index)); str_index += buf_line.size() + 1; // Ignore control characters and greater/equal to 0x80