fix warning
This commit is contained in:
parent
1f2de8b60d
commit
7ed273f070
1 changed files with 4 additions and 2 deletions
|
|
@ -237,9 +237,11 @@ impl<'a> DexFileReader<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sanity_check(&self) -> Result<()> {
|
fn sanity_check(&self) -> Result<()> {
|
||||||
if self.header.magic.version != [0x30, 0x33, 0x39] {
|
let version = self.header.magic.version;
|
||||||
|
let version = (version[0] - 0x30) * 100 + (version[1] - 0x30) * 10 + (version[2] - 0x30);
|
||||||
|
if version > 39 {
|
||||||
warn!(
|
warn!(
|
||||||
"DEX 039 is the only version currently supported, found {}",
|
"Only version <= DEX 039 are currently supported, found {}",
|
||||||
std::str::from_utf8(self.header.magic.version.as_slice())
|
std::str::from_utf8(self.header.magic.version.as_slice())
|
||||||
.unwrap_or(&format!("{:x?}", self.header.magic.version))
|
.unwrap_or(&format!("{:x?}", self.header.magic.version))
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue