From c4c710d39d5e658789bfc8b057a705390b192517 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi Date: Fri, 21 Oct 2022 20:05:21 +0300 Subject: [PATCH] GUI TTY: fix a regression (#12855) --- rpcs3/rpcs3qt/log_frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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