summaryrefslogtreecommitdiff
path: root/src/arch/dalvik
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-25 20:48:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-25 20:48:49 (GMT)
commit4ff85e315f540efbf3510c1e7456000787601d91 (patch)
tree22bfef1380b813022a849d5e8afc1d9d5408c6a1 /src/arch/dalvik
parent56f7524c4fd0fc14a509be7689f4820b31564dbc (diff)
Fixed a mistake when decoding sparse-switch and packed-switch payloads.
Diffstat (limited to 'src/arch/dalvik')
-rw-r--r--src/arch/dalvik/pseudo/switch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/dalvik/pseudo/switch.c b/src/arch/dalvik/pseudo/switch.c
index 70afb3e..45a5281 100644
--- a/src/arch/dalvik/pseudo/switch.c
+++ b/src/arch/dalvik/pseudo/switch.c
@@ -193,7 +193,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx,
if (!g_dalvik_switch_decode_data(result, content, pos))
goto gdsin_bad;
- if (ident != DPO_PACKED_SWITCH)
+ if (ident == DPO_PACKED_SWITCH)
consumed = (1 + result->switch_size) * sizeof(int32_t);
else
consumed = (2 * result->switch_size) * sizeof(int32_t);