From 0da8e11d11347711bfb6a58a0041f7944c4936cd Mon Sep 17 00:00:00 2001 From: Ben Gruver Date: Sun, 20 Nov 2011 23:13:55 -0800 Subject: [PATCH] Make sure the api level is set before reading in the dex file --- baksmali/src/main/java/org/jf/baksmali/main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baksmali/src/main/java/org/jf/baksmali/main.java b/baksmali/src/main/java/org/jf/baksmali/main.java index 43350a34..7eef7a5e 100644 --- a/baksmali/src/main/java/org/jf/baksmali/main.java +++ b/baksmali/src/main/java/org/jf/baksmali/main.java @@ -259,6 +259,8 @@ public class main { System.exit(1); } + Opcode.updateMapsForApiLevel(apiLevel); + //Read in and parse the dex file DexFile dexFile = new DexFile(dexFileFile, !fixRegisters, false); @@ -288,8 +290,6 @@ public class main { bootClassPathDirsArray[i] = bootClassPathDirs.get(i); } - Opcode.updateMapsForApiLevel(apiLevel); - baksmali.disassembleDexFile(dexFileFile.getPath(), dexFile, deodex, outputDirectory, bootClassPathDirsArray, bootClassPath, extraBootClassPathEntries.toString(), noParameterRegisters, useLocalsDirective, useSequentialLabels, outputDebugInfo, addCodeOffsets,