mirror of
https://github.com/reactos/reactos.git
synced 2024-10-08 10:24:06 +00:00
Brandon Turner <turnerb7@msu.edu>) simple check to fix > and | bug with 'rem' I (greatlord / Magnus Olsen) did small change on his patch so it did null terminate the strings right
svn path=/trunk/; revision=16262
This commit is contained in:
parent
5c2b2a05bf
commit
8a99b51cbf
|
@ -20,6 +20,9 @@
|
||||||
*
|
*
|
||||||
* 26-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
|
* 26-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
|
||||||
* Added new error AND output redirection "&>" and "&>>".
|
* Added new error AND output redirection "&>" and "&>>".
|
||||||
|
*
|
||||||
|
* 24-Jun-2005 (Brandon Turner <turnerb7@msu.edu>)
|
||||||
|
* simple check to fix > and | bug with 'rem'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
@ -54,6 +57,23 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
|
||||||
LPTSTR dp = s;
|
LPTSTR dp = s;
|
||||||
LPTSTR sp = s;
|
LPTSTR sp = s;
|
||||||
|
|
||||||
|
#ifdef INCLUDE_CMD_REM
|
||||||
|
|
||||||
|
TCHAR * line = s;
|
||||||
|
|
||||||
|
while (_istspace (*line))
|
||||||
|
line++;
|
||||||
|
|
||||||
|
/*first thing first. check to see if this is "rem" and hope out*/
|
||||||
|
if(!_tcsncmp (line, _T("rem "), 4))
|
||||||
|
{
|
||||||
|
lpnFlags = 0;
|
||||||
|
*ifn=('\0');
|
||||||
|
*ofn=('\0');
|
||||||
|
*efn=_T('\0');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* find and remove all the redirections first */
|
/* find and remove all the redirections first */
|
||||||
while (*sp)
|
while (*sp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue