Skip to content

Commit

Permalink
fix typos of hex strings decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukohe authored and pxb1988 committed Aug 31, 2023
1 parent e9e05f8 commit 9f5c165
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dex-translator/src/main/java/res/Hex.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9f5c165

Please sign in to comment.