pas2js: fixed rtl.arrayPush copy instead of reference

This commit is contained in:
mattias 2022-06-21 09:08:28 +02:00
parent 558da7363e
commit f26725e70c

View File

@ -1050,15 +1050,9 @@ var rtl = {
if(a===null){ if(a===null){
a=[]; a=[];
} else if (a['$pas2jsrefcnt']){ } else if (a['$pas2jsrefcnt']){
if (type===0){ a=rtl.arrayCopy(type,a,0,a.length);
a=a.concat();
} else {
a=rtl.arrayCopy(type,a,0,a.length);
}
}
for (var i=2; i<arguments.length; i++){
a.push(arguments[i]);
} }
rtl.arrayClone(type,arguments,2,arguments.length-1,a,a.length);
return a; return a;
}, },