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(); QByteArray line = readLine();
if (line.size()) if (line.size())
{ {
line.resize(line.size() - 2); line.resize(line.size() - 1);
line.push_back('\0');
if (line == "showsettings") if (line == "showsettings")
{ {
emit showsettings(); emit showsettings();