diff options
| author | 2015-02-09 12:17:26 -0500 | |
|---|---|---|
| committer | 2015-02-09 12:17:26 -0500 | |
| commit | 71ec7b53a1b4ecce0623dded1e445818a757b695 (patch) | |
| tree | 335c2c4bb5535d5b4bd51c2d448655297a4e2efd /src/cuchaz/enigma/bytecode/MethodParameterWriter.java | |
| parent | added types to fields (diff) | |
| download | enigma-fork-71ec7b53a1b4ecce0623dded1e445818a757b695.tar.gz enigma-fork-71ec7b53a1b4ecce0623dded1e445818a757b695.tar.xz enigma-fork-71ec7b53a1b4ecce0623dded1e445818a757b695.zip | |
add converter to update old mappings format
fix a few decompiler issues too
Diffstat (limited to 'src/cuchaz/enigma/bytecode/MethodParameterWriter.java')
| -rw-r--r-- | src/cuchaz/enigma/bytecode/MethodParameterWriter.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/bytecode/MethodParameterWriter.java b/src/cuchaz/enigma/bytecode/MethodParameterWriter.java index 5d4ca1a..853928c 100644 --- a/src/cuchaz/enigma/bytecode/MethodParameterWriter.java +++ b/src/cuchaz/enigma/bytecode/MethodParameterWriter.java | |||
| @@ -18,6 +18,7 @@ import javassist.CtClass; | |||
| 18 | import cuchaz.enigma.mapping.ArgumentEntry; | 18 | import cuchaz.enigma.mapping.ArgumentEntry; |
| 19 | import cuchaz.enigma.mapping.BehaviorEntry; | 19 | import cuchaz.enigma.mapping.BehaviorEntry; |
| 20 | import cuchaz.enigma.mapping.BehaviorEntryFactory; | 20 | import cuchaz.enigma.mapping.BehaviorEntryFactory; |
| 21 | import cuchaz.enigma.mapping.Signature; | ||
| 21 | import cuchaz.enigma.mapping.Translator; | 22 | import cuchaz.enigma.mapping.Translator; |
| 22 | 23 | ||
| 23 | public class MethodParameterWriter { | 24 | public class MethodParameterWriter { |
| @@ -35,7 +36,12 @@ public class MethodParameterWriter { | |||
| 35 | BehaviorEntry behaviorEntry = BehaviorEntryFactory.create(behavior); | 36 | BehaviorEntry behaviorEntry = BehaviorEntryFactory.create(behavior); |
| 36 | 37 | ||
| 37 | // get the number of arguments | 38 | // get the number of arguments |
| 38 | int numParams = behaviorEntry.getSignature().getArgumentTypes().size(); | 39 | Signature signature = behaviorEntry.getSignature(); |
| 40 | if (signature == null) { | ||
| 41 | // static initializers have no signatures, or arguments | ||
| 42 | continue; | ||
| 43 | } | ||
| 44 | int numParams = signature.getArgumentTypes().size(); | ||
| 39 | if (numParams <= 0) { | 45 | if (numParams <= 0) { |
| 40 | continue; | 46 | continue; |
| 41 | } | 47 | } |