Author: cfinck
Date: Mon Nov 3 11:45:54 2008
New Revision: 37172
URL:
http://svn.reactos.org/svn/reactos?rev=37172&view=rev
Log:
Merge in r37155
Modified:
branches/ros-branch-0_3_7/reactos/base/shell/cmd/batch.c
Modified: branches/ros-branch-0_3_7/reactos/base/shell/cmd/batch.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_7/reactos/base/s…
==============================================================================
--- branches/ros-branch-0_3_7/reactos/base/shell/cmd/batch.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_7/reactos/base/shell/cmd/batch.c [iso-8859-1] Mon Nov 3
11:45:54 2008
@@ -427,7 +427,7 @@
return textline;
}
- if (!FileGetString (bc->hBatchFile, textline, sizeof (textline) / sizeof
(textline[0])))
+ if (!FileGetString (bc->hBatchFile, textline, sizeof (textline) / sizeof
(textline[0]) - 1))
{
TRACE ("ReadBatchLine(): Reached EOF!\n");
/* End of file.... */
@@ -439,6 +439,9 @@
continue;
}
TRACE ("ReadBatchLine(): textline: \'%s\'\n",
debugstr_aw(textline));
+
+ if (textline[_tcslen(textline) - 1] != _T('\n'))
+ _tcscat(textline, _T("\n"));
first = textline;