Fix bug in RawDexIO.readRawDexFile(byte[] buf, int offset, Opcodes opcodes)

The method misbehaved if offset was non-zero.
This commit is contained in:
Lanchon 2018-06-13 00:57:12 -03:00
parent 21f0129b60
commit 232161206a

View File

@ -62,7 +62,7 @@ public class RawDexIO {
int dexVersion = HeaderItem.getVersion(buf, offset); int dexVersion = HeaderItem.getVersion(buf, offset);
opcodes = OpcodeUtils.getOpcodesFromDexVersion(dexVersion); opcodes = OpcodeUtils.getOpcodesFromDexVersion(dexVersion);
}; };
return new DexBackedDexFile(opcodes, buf, 0); return new DexBackedDexFile(opcodes, buf, offset);
} }
// Write // Write