Fix the calculation of the "this" register in MethodAnalyzer

This commit is contained in:
Ben Gruver 2013-04-07 20:24:35 -07:00
parent 8d74f47b45
commit e3478f4fd4

View File

@ -142,7 +142,7 @@ public class MethodAnalyzer {
//current class
if (!MethodUtil.isStatic(method)) {
nonParameterRegisters--;
int thisRegister = totalRegisters - parameterRegisters - 1;
int thisRegister = totalRegisters - parameterRegisters;
//if this is a constructor, then set the "this" register to an uninitialized reference of the current class
if (MethodUtil.isConstructor(method)) {