Permalink
Browse files

. 修正 bug.

  • Loading branch information...
yaya
yaya committed Apr 11, 2018
1 parent f5b17e3 commit 08c011fa67192276ece56b3e7f79e85a7b063508
Showing with 7 additions and 2 deletions.
  1. +7 −2 stage2/builtins.c
@@ -16955,15 +16955,20 @@ static int bat_run_script(char *filename,char *arg,int flags)
}
int per_cent = 0;
int asd = 0;
while(*p_bat)
{
if (*p_bat != '%' || (file_ext = p_bat++,*p_bat == '%'))
while (*p_bat == '%' && *(p_bat+1) == '%' && *(p_bat+2) == '%')
p_bat++;
if (*p_bat != '%' || (file_ext = p_bat++,*p_bat == '%' && per_cent==0))
{//if *p_bat != '%' or p_bat[1] == '%'(*p_bat == p_bat[1] == '%');
*p_cmd++ = *p_bat++;
continue;
}//file_ext now use for backup p_bat see the loop end.
if (per_cent)
if (*p_bat == '^')
asd = 1;
if (per_cent && asd == 0)
{
per_cent = 0;
p_bat = file_ext;

0 comments on commit 08c011f

Please sign in to comment.