Setting null to counter should be a no-op (#11012)

This commit is contained in:
Cardillan
2025-07-17 18:45:47 -04:00
committed by GitHub
parent 82152948e9
commit 549fa1a065
+4
View File
@@ -103,9 +103,13 @@ public class LVar{
public void set(LVar other){ public void set(LVar other){
isobj = other.isobj; isobj = other.isobj;
// Setting a non-numeric value to @counter must preserve its numeric field
if(isobj){
objval = other.objval; objval = other.objval;
}else{
numval = other.numval; numval = other.numval;
} }
}
public static boolean invalid(double d){ public static boolean invalid(double d){
return Double.isNaN(d) || Double.isInfinite(d); return Double.isNaN(d) || Double.isInfinite(d);