Prevent setting counter to null using write instruction (#10774)
* Prevent setting counter to null using write instruction * Reset isobj flag on counter on every instruction
This commit is contained in:
@@ -88,6 +88,7 @@ public class LExecutor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(counter.numval < instructions.length){
|
if(counter.numval < instructions.length){
|
||||||
|
counter.isobj = false;
|
||||||
instructions[(int)(counter.numval++)].run(this);
|
instructions[(int)(counter.numval++)].run(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -781,10 +782,8 @@ public class LExecutor{
|
|||||||
public void run(LExecutor exec){
|
public void run(LExecutor exec){
|
||||||
if(!to.constant){
|
if(!to.constant){
|
||||||
if(from.isobj){
|
if(from.isobj){
|
||||||
if(to != exec.counter){
|
to.objval = from.objval;
|
||||||
to.objval = from.objval;
|
to.isobj = true;
|
||||||
to.isobj = true;
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
to.numval = LVar.invalid(from.numval) ? 0 : from.numval;
|
to.numval = LVar.invalid(from.numval) ? 0 : from.numval;
|
||||||
to.isobj = false;
|
to.isobj = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user