fix for Soot: trim instruction array to avoid nulls
This commit is contained in:
parent
d690d94cdd
commit
948d69cbb8
|
@ -1181,7 +1181,7 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
|
|||
* an {@link IncipientCFG}
|
||||
*/
|
||||
protected final static class AstCFG extends AbstractCFG<SSAInstruction, PreBasicBlock> {
|
||||
private final SSAInstruction[] instructions;
|
||||
private SSAInstruction[] instructions;
|
||||
|
||||
private final int[] instructionToBlockMap;
|
||||
|
||||
|
@ -1364,6 +1364,12 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (instructions.length > x) {
|
||||
SSAInstruction[] ni = new SSAInstruction[x];
|
||||
System.arraycopy(instructions, 0, ni, 0, x);
|
||||
instructions = ni;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue