Skip to content

Commit

Permalink
fix for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
liyanboy74 committed Aug 10, 2022
1 parent 4262543 commit 5defe7d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions htmixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ my_buff_s* cheack_loops(my_buff_s* buff)
{
for(h=0;h<l;)
{
if(*(loop_start_loc+h)=='}'&&*(loop_start_loc+h+1)=='}')
if(*(loop_start_loc+h)=='}'&&*(loop_start_loc+h+1)=='}'&&\
*(loop_start_loc+h-1)!='}'&&*(loop_start_loc+h-1)!=' '&&*(loop_start_loc+h-1)!='\r'&&\
*(loop_start_loc+h-1)!='\n'&&*(loop_start_loc+h-1)!='\t'&&*(loop_start_loc+h-1)!='>')
{
sprintf(CBuff,"-%d}}",loop_c);
t=strlen(CBuff);
Expand Down Expand Up @@ -423,8 +425,12 @@ int main(int argc,char* argv[])
buff=remove_space(buff);

fp=fopen(genFileName,"w");
fwrite(buff->buff,1,buff->len,fp);
fclose(fp);
if(fp!=NULL)
{
fwrite(buff->buff,1,buff->len,fp);
fclose(fp);
}
else printf("Can't open %s",genFileName);

clear_var_list();
}
Expand Down

0 comments on commit 5defe7d

Please sign in to comment.