Fix a bug in frontend leading to incorrect behaviour when dealing with names starting/ending with whitespace
authorunc0rr
Sat, 06 Jun 2009 12:42:35 +0000
changeset 2149 2eda77999bec
parent 2148 d124d0dfff73
child 2150 45b695f3a7b9
Fix a bug in frontend leading to incorrect behaviour when dealing with names starting/ending with whitespace
QTfrontend/newnetclient.cpp
--- a/QTfrontend/newnetclient.cpp	Fri Jun 05 14:19:21 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Sat Jun 06 12:42:35 2009 +0000
@@ -161,7 +161,8 @@
 void HWNewNet::ClientRead()
 {
 	while (NetSocket.canReadLine()) {
-		QString s = QString::fromUtf8(NetSocket.readLine().trimmed());
+		QString s = QString::fromUtf8(NetSocket.readLine());
+		if (s.endsWith('\n')) s.chop(1);
 
 		if (s.size() == 0) {
 			ParseCmd(cmdbuf);