From e581028182b710e79206254f031e98db6d029068 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 1 Feb 2015 16:34:39 +0100 Subject: [PATCH] IPCChannel: Trim parameter strings before sending. --- src/IPCChannel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IPCChannel.cpp b/src/IPCChannel.cpp index eeb8819..1d7fa68 100644 --- a/src/IPCChannel.cpp +++ b/src/IPCChannel.cpp @@ -346,7 +346,7 @@ bool MUtils::IPCChannel::send(const quint32 &command, const quint32 &flags, cons const quint32 param_count = qMin(MAX_PARAM_CNT, (quint32)params.count()); for(quint32 i = 0; i < param_count; i++) { - strncpy_s(ipc_msg.payload.params.values[i], MAX_PARAM_LEN, MUTILS_UTF8(params[i]), _TRUNCATE); + strncpy_s(ipc_msg.payload.params.values[i], MAX_PARAM_LEN, MUTILS_UTF8(params[i].trimmed()), _TRUNCATE); } ipc_msg.payload.params.count = param_count; }