mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:25:52 +00:00
ReadBatchLine: Add a \n to the line if it doesn't already have one
svn path=/trunk/; revision=37155
This commit is contained in:
parent
ae1019f232
commit
e0d327a9ec
1 changed files with 4 additions and 1 deletions
|
@ -427,7 +427,7 @@ LPTSTR ReadBatchLine ()
|
||||||
return textline;
|
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");
|
TRACE ("ReadBatchLine(): Reached EOF!\n");
|
||||||
/* End of file.... */
|
/* End of file.... */
|
||||||
|
@ -440,6 +440,9 @@ LPTSTR ReadBatchLine ()
|
||||||
}
|
}
|
||||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
||||||
|
|
||||||
|
if (textline[_tcslen(textline) - 1] != _T('\n'))
|
||||||
|
_tcscat(textline, _T("\n"));
|
||||||
|
|
||||||
first = textline;
|
first = textline;
|
||||||
|
|
||||||
/* cmd block over multiple lines (..) */
|
/* cmd block over multiple lines (..) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue