ARSCDecoder:readConfigFlags(): fixed format of logging of exceeding bytes.

This commit is contained in:
Ryszard Wiśniewski 2011-11-05 01:48:33 +01:00
parent 65c20a8411
commit 46cdbd8f8d

View File

@ -267,7 +267,7 @@ public class ARSCDecoder {
if (exceedingSize > 0) { if (exceedingSize > 0) {
byte[] buf = new byte[exceedingSize]; byte[] buf = new byte[exceedingSize];
mIn.readFully(buf); mIn.readFully(buf);
BigInteger exceedingBI = new BigInteger(buf); BigInteger exceedingBI = new BigInteger(1, buf);
if (exceedingBI.equals(BigInteger.ZERO)) { if (exceedingBI.equals(BigInteger.ZERO)) {
LOGGER.fine(String.format( LOGGER.fine(String.format(
@ -275,7 +275,7 @@ public class ARSCDecoder {
KNOWN_CONFIG_BYTES)); KNOWN_CONFIG_BYTES));
} else { } else {
LOGGER.warning(String.format( LOGGER.warning(String.format(
"Config flags size > %d. Exceeding bytes: %0" + (exceedingSize * 2) + "X.", "Config flags size > %d. Exceeding bytes: 0x%X.",
KNOWN_CONFIG_BYTES, exceedingBI)); KNOWN_CONFIG_BYTES, exceedingBI));
isInvalid = true; isInvalid = true;
} }