mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 08:55:11 +00:00
AS3 direct editing - submethod name resolving fix
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.decompiler.flash.abc.types.ABCException;
|
||||
@@ -49,6 +50,7 @@ public class SourceGeneratorLocalData implements Serializable {
|
||||
public List<GraphTargetItem> scopeStack = new ArrayList<>();
|
||||
public boolean documentClass;
|
||||
public ScriptInfo currentScript;
|
||||
public boolean subMethod = false;
|
||||
|
||||
public String getFullClass() {
|
||||
return pkg == null || pkg.isEmpty() ? currentClass : pkg + "." + currentClass;
|
||||
|
||||
@@ -1386,6 +1386,7 @@ public class AVM2SourceGenerator implements SourceGenerator {
|
||||
newlocalData.traitUsages = localData.traitUsages;
|
||||
newlocalData.currentScript = localData.currentScript;
|
||||
newlocalData.documentClass = localData.documentClass;
|
||||
newlocalData.subMethod = subMethod;
|
||||
localData = newlocalData;
|
||||
|
||||
localData.activationReg = 0;
|
||||
|
||||
@@ -630,7 +630,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item {
|
||||
List<ABC> abcs = new ArrayList<>();
|
||||
abcs.add(abc);
|
||||
abcs.addAll(otherABCs);
|
||||
if (cname != null && AVM2SourceGenerator.searchPrototypeChain(true, abcs, pkgName, cname, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue) && (localData.currentClass.equals("".equals(outNs.getVal()) ? outName.getVal() : outNs.getVal() + "." + outName.getVal()))) {
|
||||
if (!localData.subMethod && cname != null && AVM2SourceGenerator.searchPrototypeChain(true, abcs, pkgName, cname, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue) && (localData.currentClass.equals("".equals(outNs.getVal()) ? outName.getVal() : outNs.getVal() + "." + outName.getVal()))) {
|
||||
NameAVM2Item nobj = new NameAVM2Item(new TypeItem(localData.getFullClass()), 0, "this", null, false, openedNamespaces);
|
||||
nobj.setRegNumber(0);
|
||||
obj = nobj;
|
||||
|
||||
Reference in New Issue
Block a user