summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/bytecode
diff options
context:
space:
mode:
authorGravatar jeff2015-02-09 23:31:24 -0500
committerGravatar jeff2015-02-09 23:31:24 -0500
commitab6de199201f3cb292b986b2803d7d30b1485a47 (patch)
treedf9760cab6ad95ef1ab10cfb98c89d84324024e4 /src/cuchaz/enigma/bytecode
parentfix translation issues, particularly with fields (diff)
downloadenigma-fork-ab6de199201f3cb292b986b2803d7d30b1485a47.tar.gz
enigma-fork-ab6de199201f3cb292b986b2803d7d30b1485a47.tar.xz
enigma-fork-ab6de199201f3cb292b986b2803d7d30b1485a47.zip
work around bad tokens generated by procyon for now
Diffstat (limited to 'src/cuchaz/enigma/bytecode')
-rw-r--r--src/cuchaz/enigma/bytecode/InnerClassWriter.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuchaz/enigma/bytecode/InnerClassWriter.java b/src/cuchaz/enigma/bytecode/InnerClassWriter.java
index 817500b..5350b86 100644
--- a/src/cuchaz/enigma/bytecode/InnerClassWriter.java
+++ b/src/cuchaz/enigma/bytecode/InnerClassWriter.java
@@ -13,7 +13,6 @@ package cuchaz.enigma.bytecode;
13import java.util.Collection; 13import java.util.Collection;
14 14
15import javassist.CtClass; 15import javassist.CtClass;
16import javassist.bytecode.AccessFlag;
17import javassist.bytecode.ConstPool; 16import javassist.bytecode.ConstPool;
18import javassist.bytecode.Descriptor; 17import javassist.bytecode.Descriptor;
19import javassist.bytecode.EnclosingMethodAttribute; 18import javassist.bytecode.EnclosingMethodAttribute;
@@ -77,18 +76,19 @@ public class InnerClassWriter {
77 int innerClassIndex = constPool.addClassInfo(obfClassEntry.getName()); 76 int innerClassIndex = constPool.addClassInfo(obfClassEntry.getName());
78 int outerClassIndex = 0; 77 int outerClassIndex = 0;
79 int innerClassSimpleNameIndex = 0; 78 int innerClassSimpleNameIndex = 0;
79 int accessFlags = 0;
80 if (!m_jarIndex.isAnonymousClass(obfInnerClassName)) { 80 if (!m_jarIndex.isAnonymousClass(obfInnerClassName)) {
81 outerClassIndex = constPool.addClassInfo(obfClassEntry.getOuterClassName()); 81 outerClassIndex = constPool.addClassInfo(obfClassEntry.getOuterClassName());
82 innerClassSimpleNameIndex = constPool.addUtf8Info(obfClassEntry.getInnerClassName()); 82 innerClassSimpleNameIndex = constPool.addUtf8Info(obfClassEntry.getInnerClassName());
83 } 83 }
84 84
85 attr.append(innerClassIndex, outerClassIndex, innerClassSimpleNameIndex, c.getClassFile().getAccessFlags() & ~AccessFlag.SUPER); 85 attr.append(innerClassIndex, outerClassIndex, innerClassSimpleNameIndex, accessFlags);
86 86
87 /* DEBUG 87 /* DEBUG
88 System.out.println(String.format("\tOBF: %s -> ATTR: %s,%s,%s (replace %s with %s)", 88 System.out.println(String.format("\tOBF: %s -> ATTR: %s,%s,%s (replace %s with %s)",
89 obfClassEntry, 89 obfClassEntry,
90 attr.outerClass(attr.tableLength() - 1),
91 attr.innerClass(attr.tableLength() - 1), 90 attr.innerClass(attr.tableLength() - 1),
91 attr.outerClass(attr.tableLength() - 1),
92 attr.innerName(attr.tableLength() - 1), 92 attr.innerName(attr.tableLength() - 1),
93 Constants.NonePackage + "/" + obfInnerClassName, 93 Constants.NonePackage + "/" + obfInnerClassName,
94 obfClassEntry.getName() 94 obfClassEntry.getName()