From a490433bf5715410d8fecb977ba0597c643a56de Mon Sep 17 00:00:00 2001 From: Wei He Date: Thu, 26 May 2022 10:53:13 +0800 Subject: [PATCH] fix typos of hex strings decoding --- dex-translator/src/main/java/res/Hex.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dex-translator/src/main/java/res/Hex.java b/dex-translator/src/main/java/res/Hex.java index d6a3010b1..4995b76f5 100644 --- a/dex-translator/src/main/java/res/Hex.java +++ b/dex-translator/src/main/java/res/Hex.java @@ -56,15 +56,15 @@ public static byte[] decode_B(String src) { } int ll; if (l >= '0' && l <= '9') { - ll = h - '0'; + ll = l - '0'; } else if (l >= 'a' && l <= 'f') { - ll = h - 'a' + 10; + ll = l - 'a' + 10; } else if (l >= 'A' && l <= 'F') { - ll = h - 'A' + 10; + ll = l - 'A' + 10; } else { throw new RuntimeException(); } - d[i] = (char) ((hh << 4) | ll); + ret[i] = (byte) ((hh << 4) | ll); } return ret; }