From af2f54245b866edae1d2a216eac13ea3577fb686 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 3 Dec 2015 07:57:12 -0600 Subject: [PATCH] [skip] remove confusing logic --- .../java/brut/androlib/res/decoder/StringBlock.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java index 72ba3ba8..44a11ebb 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/StringBlock.java @@ -60,13 +60,13 @@ public class StringBlock { if (styleCount != 0) { block.m_styleOffsets = reader.readIntArray(styleCount); } - { - int size = ((stylesOffset == 0) ? chunkSize : stylesOffset) - stringsOffset; - block.m_strings = new byte[size]; - reader.readFully(block.m_strings); - } + + int size = ((stylesOffset == 0) ? chunkSize : stylesOffset) - stringsOffset; + block.m_strings = new byte[size]; + reader.readFully(block.m_strings); + if (stylesOffset != 0) { - int size = (chunkSize - stylesOffset); + size = (chunkSize - stylesOffset); block.m_styles = reader.readIntArray(size / 4); // read remaining bytes