fix it for 3ceam
script.c
void run_script_main(struct script_state *st)
{
case C_FUNC:
run_func(st);
if(st->state==GOTO){
st->state = RUN;
- if( gotocount>0 && (--gotocount)<=0 ){
+ if( !st->freeloop && gotocount>0 && (--gotocount)<=0 ){
ShowError("run_script: infinity loop !\n");
script_reportsrc(st);
st->state=END;
}
}
break;
default:
ShowError("unknown command : %d @ %d\n",c,st->pos);
st->state=END;
break;
}
- if(cmdcount>0 && (--cmdcount)<=0 ){
+ if( !st->freeloop && cmdcount>0 && (--cmdcount)<=0 ){
ShowError("run_script: infinity loop !\n");
script_reportsrc(st);
//ShowStatus("infinity loop cmdcount= %d\n", cmdcount ) ; //for test
st->state=END;
}
}