From 8d7388ee078764487a1e2d5d533a7024f8a78a09 Mon Sep 17 00:00:00 2001 From: Jeffrey Morlan Date: Mon, 8 Sep 2008 16:23:33 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=36061 --- reactos/base/shell/cmd/batch.c | 1 + reactos/base/shell/cmd/for.c | 1 + 2 files changed, 2 insertions(+) diff --git a/reactos/base/shell/cmd/batch.c b/reactos/base/shell/cmd/batch.c index 2f0c613549c..1c35123f295 100644 --- a/reactos/base/shell/cmd/batch.c +++ b/reactos/base/shell/cmd/batch.c @@ -421,6 +421,7 @@ LPTSTR ReadBatchLine () } } + *dp++ = _T('\n'); *dp = _T('\0'); return textline; diff --git a/reactos/base/shell/cmd/for.c b/reactos/base/shell/cmd/for.c index e60ec383157..d504540d3c9 100644 --- a/reactos/base/shell/cmd/for.c +++ b/reactos/base/shell/cmd/for.c @@ -130,6 +130,7 @@ INT cmd_for (LPTSTR param) 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;