Change the truncate to -1 from -2 and remove the other part dealing with null terminators

This commit is contained in:
Insanemal
2022-03-07 22:24:44 +10:00
parent 396f491af2
commit 71c217efe9

View File

@@ -31,8 +31,7 @@ void UnixManagerSocket::readyToRead()
QByteArray line = readLine();
if (line.size())
{
line.resize(line.size() - 2);
line.push_back('\0');
line.resize(line.size() - 1);
if (line == "showsettings")
{
emit showsettings();