From 4782b7ce3e3b5cb328ec1092b85e6383a3158097 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Wed, 24 Aug 2005 23:33:34 +0000 Subject: [PATCH] fixing a bug in searching for cmd for bat/cmd files, thx ravelo to found this stupied bug svn path=/trunk/; revision=17528 --- reactos/subsys/system/cmd/start.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/subsys/system/cmd/start.c b/reactos/subsys/system/cmd/start.c index a5adc3f50df..cbb49695b49 100644 --- a/reactos/subsys/system/cmd/start.c +++ b/reactos/subsys/system/cmd/start.c @@ -130,11 +130,12 @@ INT cmd_start (LPTSTR First, LPTSTR Rest) error_bad_command (); return 1; } - - memcpy(&szFullCmdLine[_tcslen(szFullCmdLine)],_T("\" /K "), 5 * sizeof(TCHAR)); - memcpy(&szFullCmdLine[_tcslen(szFullCmdLine)], szFullName, _tcslen(szFullName) * sizeof(TCHAR)); - memcpy(&szFullCmdLine[1], &szFullCmdLine[2], _tcslen(szFullCmdLine) * sizeof(TCHAR)); - szFullCmdLine[0] = _T('\"'); + + memcpy(&szFullCmdLine[_tcslen(szFullCmdLine)],_T("\" /K "), 5 * sizeof(TCHAR)); + memcpy(&szFullCmdLine[_tcslen(szFullCmdLine)], szFullName, _tcslen(szFullName) * sizeof(TCHAR)); + memcpy(&szFullCmdLine[1], &szFullCmdLine[0], _tcslen(szFullCmdLine) * sizeof(TCHAR)); + szFullCmdLine[0] = _T('\"'); + } #ifdef _DEBUG