Author: ekohl
Date: Mon Jul 4 21:04:00 2016
New Revision: 71813
URL:
http://svn.reactos.org/svn/reactos?rev=71813&view=rev
Log:
[SC]
- Fix buggy actions parser.
- Use proper NUL character instead of zero.
Modified:
trunk/reactos/base/applications/sc/misc.c
Modified: trunk/reactos/base/applications/sc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sc/misc.…
==============================================================================
--- trunk/reactos/base/applications/sc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sc/misc.c [iso-8859-1] Mon Jul 4 21:04:00 2016
@@ -189,16 +189,16 @@
/* Replace all slashes by null characters */
p = pStringBuffer;
- while (*p != 0 /*_T('\0')*/)
+ while (*p != _T('\0'))
{
if (*p == _T('/'))
- *p = 0; //_T('\0');
+ *p = _T('\0');
p++;
}
/* Count the arguments in the buffer */
p = pStringBuffer;
- while (*p != 0 /*_T('\0')*/)
+ while (*p != _T('\0'))
{
nCount++;
@@ -224,11 +224,11 @@
if (nCount % 2 == 0)
{
/* Action */
- if (_tcsicmp(p, _T("reboot")))
+ if (!lstrcmpi(p, _T("reboot")))
pActions[nCount / 2].Type = SC_ACTION_REBOOT;
- else if (_tcsicmp(p, _T("restart")))
+ else if (!lstrcmpi(p, _T("restart")))
pActions[nCount / 2].Type = SC_ACTION_RESTART;
- else if (_tcsicmp(p, _T("run")))
+ else if (!lstrcmpi(p, _T("run")))
pActions[nCount / 2].Type = SC_ACTION_RUN_COMMAND;
else
break;
@@ -262,7 +262,7 @@
OUT LPCTSTR *ppServiceName,
OUT LPSERVICE_FAILURE_ACTIONS pFailureActions)
{
- INT /*i,*/ ArgIndex = 1;
+ INT ArgIndex = 1;
LPCTSTR lpActions = NULL;
LPCTSTR lpReset = NULL;