mirror of
https://github.com/revanced/smali.git
synced 2025-06-12 04:17:36 +02:00
Include the first 8 bytes of the file when reporting a bad magic value
git-svn-id: https://smali.googlecode.com/svn/trunk@468 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
@ -306,7 +306,13 @@ public class DexFile
|
||||
} else if (isDex) {
|
||||
in = new ByteArrayInput(FileUtils.readFile(file));
|
||||
} else {
|
||||
throw new RuntimeException("bad magic value");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("bad magic value:");
|
||||
for (int i=0; i<8; i++) {
|
||||
sb.append(" ");
|
||||
sb.append(magic[i]);
|
||||
}
|
||||
throw new RuntimeException(sb.toString());
|
||||
}
|
||||
|
||||
ReadContext readContext = new ReadContext(this);
|
||||
|
Reference in New Issue
Block a user