mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fix another bug in goto it is internel label :eof jump to end of the bat file
svn path=/trunk/; revision=16670
This commit is contained in:
parent
4365851492
commit
368f39faad
1 changed files with 12 additions and 2 deletions
|
@ -75,7 +75,16 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
||||||
|
|
||||||
/* set file pointer to the beginning of the batch file */
|
/* set file pointer to the beginning of the batch file */
|
||||||
lNewPosHigh = 0;
|
lNewPosHigh = 0;
|
||||||
SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_BEGIN);
|
|
||||||
|
/* jump to end of the file */
|
||||||
|
if ( _tcsicmp( param, _T(":eof"))==0)
|
||||||
|
{
|
||||||
|
SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* jump to begin of the file */
|
||||||
|
SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_BEGIN);
|
||||||
|
|
||||||
while (FileGetString (bc->hBatchFile, textline, sizeof(textline)))
|
while (FileGetString (bc->hBatchFile, textline, sizeof(textline)))
|
||||||
{
|
{
|
||||||
|
@ -105,6 +114,7 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* use whole label name */
|
/* use whole label name */
|
||||||
if ((*tmp == _T(':')) && (_tcsicmp (++tmp, param) == 0))
|
if ((*tmp == _T(':')) && (_tcsicmp (++tmp, param) == 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue