Author: phater
Date: Wed May 17 10:53:54 2017
New Revision: 74568
URL:
http://svn.reactos.org/svn/reactos?rev=74568&view=rev
Log:
[MSTSC] Fix parsing of settings. Patch by Stas'M. Thanks. CORE-13223
Modified:
trunk/reactos/base/applications/mstsc/settings.c
Modified: trunk/reactos/base/applications/mstsc/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/se…
==============================================================================
--- trunk/reactos/base/applications/mstsc/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mstsc/settings.c [iso-8859-1] Wed May 17 10:53:54
2017
@@ -275,7 +275,10 @@
else if (lpToken[0] == L's')
{
pRdpSettings->pSettings[i].Type = lpToken[0];
- lpToken = wcstok(NULL, szNewline);
+ if (lpToken[2] == 13 || lpToken[2] == 10 || lpToken[2] == 0)
+ lpToken[0] = 0; // terminate string
+ else
+ lpToken = wcstok(NULL, szNewline);
if (lpToken != NULL)
wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken);
}