fix for nasty bug in decoding dup2_x2
This commit is contained in:
parent
400b2055ce
commit
196f7cb153
|
@ -513,10 +513,11 @@ public abstract class Decoder implements Constants {
|
||||||
case OP_dup2_x1:
|
case OP_dup2_x1:
|
||||||
i = DupInstruction.make(elemCount(stackWords, stackLen - 1), 1);
|
i = DupInstruction.make(elemCount(stackWords, stackLen - 1), 1);
|
||||||
break;
|
break;
|
||||||
case OP_dup2_x2:
|
case OP_dup2_x2: {
|
||||||
i = DupInstruction.make(elemCount(stackWords, stackLen - 1), elemCount(stackWords, stackLen - 2));
|
int twoDown = elemCount(stackWords, stackLen - 1);
|
||||||
|
i = DupInstruction.make(twoDown, elemCount(stackWords, stackLen - twoDown - 1));
|
||||||
break;
|
break;
|
||||||
case OP_iinc: {
|
} case OP_iinc: {
|
||||||
int v = wide ? decodeUShort(index) : (code[index] & 0xFF);
|
int v = wide ? decodeUShort(index) : (code[index] & 0xFF);
|
||||||
int c = wide ? decodeShort(index + 2) : code[index + 1];
|
int c = wide ? decodeShort(index + 2) : code[index + 1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue