diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/source/cfr')
| -rw-r--r-- | src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java b/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java index b9cdbea..e265d9d 100644 --- a/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java +++ b/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java | |||
| @@ -82,7 +82,7 @@ public class EnigmaDumper implements Dumper { | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | private MethodEntry getMethodEntry(MethodPrototype method) { | 84 | private MethodEntry getMethodEntry(MethodPrototype method) { |
| 85 | if (method.getClassType() == null) { | 85 | if (method == null || method.getClassType() == null) { |
| 86 | return null; | 86 | return null; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| @@ -97,7 +97,7 @@ public class EnigmaDumper implements Dumper { | |||
| 97 | private LocalVariableEntry getParameterEntry(MethodPrototype method, int parameterIndex, String name) { | 97 | private LocalVariableEntry getParameterEntry(MethodPrototype method, int parameterIndex, String name) { |
| 98 | int variableIndex = method.isInstanceMethod() ? 1 : 0; | 98 | int variableIndex = method.isInstanceMethod() ? 1 : 0; |
| 99 | for (int i = 0; i < parameterIndex; i++) { | 99 | for (int i = 0; i < parameterIndex; i++) { |
| 100 | variableIndex += method.getArgs().get(parameterIndex).getStackType().getComputationCategory(); | 100 | variableIndex += method.getArgs().get(i).getStackType().getComputationCategory(); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | return new LocalVariableEntry(getMethodEntry(method), variableIndex, name, true, null); | 103 | return new LocalVariableEntry(getMethodEntry(method), variableIndex, name, true, null); |