mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +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
|
@ -427,7 +427,7 @@ LPTSTR ReadBatchLine ()
|
|||
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.... */
|
||||
|
@ -440,6 +440,9 @@ LPTSTR ReadBatchLine ()
|
|||
}
|
||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
||||
|
||||
if (textline[_tcslen(textline) - 1] != _T('\n'))
|
||||
_tcscat(textline, _T("\n"));
|
||||
|
||||
first = textline;
|
||||
|
||||
/* cmd block over multiple lines (..) */
|
||||
|
|
Loading…
Reference in a new issue