Merge pull request #6418 from gemu2015/scripter-bugfix

scripter bug fix
This commit is contained in:
Theo Arends 2019-09-14 09:56:36 +02:00 committed by GitHub
commit e126faa114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -2045,6 +2045,8 @@ void Replace_Cmd_Vars(char *srcbuf,char *dstbuf,uint16_t dstsize) {
if (isdigit(*cp)) {
dprec=*cp&0xf;
cp++;
} else {
dprec=glob_script_mem.script_dprec;
}
cp=isvar(cp,&vtype,&ind,&fvar,string,0);
if (vtype!=VAR_NV) {
@ -3343,7 +3345,6 @@ bool ScriptCommand(void) {
if (XdrvMailbox.data[count]==';') XdrvMailbox.data[count]='\n';
}
execute_script(XdrvMailbox.data);
Scripter_save_pvars();
}
}
return serviced;
@ -3735,6 +3736,7 @@ bool Xdrv10(uint8_t function)
// assure permanent memory is 4 byte aligned
{ uint32_t ptr=(uint32_t)glob_script_mem.script_pram;
ptr&=0xfffffffc;
ptr+=4;
glob_script_mem.script_pram=(uint8_t*)ptr;
glob_script_mem.script_pram_size-=4;
}