Author: jmorlan Date: Mon Sep 8 11:23:33 2008 New Revision: 36061
URL: http://svn.reactos.org/svn/reactos?rev=36061&view=rev Log: - Batch: In a line generated by a 'for', add the \n that the parser expects. (Bug 3717) - cmd_for: Don't leave raw_params uninitialized; could cause a crash in ExitBatch.
Modified: trunk/reactos/base/shell/cmd/batch.c trunk/reactos/base/shell/cmd/for.c
Modified: trunk/reactos/base/shell/cmd/batch.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev=... ============================================================================== --- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Mon Sep 8 11:23:33 2008 @@ -421,6 +421,7 @@ } }
+ *dp++ = _T('\n'); *dp = _T('\0');
return textline;
Modified: trunk/reactos/base/shell/cmd/for.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/for.c?rev=36... ============================================================================== --- trunk/reactos/base/shell/cmd/for.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/for.c [iso-8859-1] Mon Sep 8 11:23:33 2008 @@ -130,6 +130,7 @@
bc->hBatchFile = INVALID_HANDLE_VALUE; bc->ffind = NULL; + bc->raw_params = NULL; bc->params = BatchParams (_T(""), param); /* Split out list */ bc->shiftlevel = 0; bc->forvar = var;