Skip to content

Commit 022df72

Browse files
committed
[SMALI] signed hex values for packed-switch
1 parent dfca9f5 commit 022df72

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/java/com/reandroid/dex/ins/InsPackedSwitchData.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.reandroid.dex.smali.model.SmaliInstruction;
2424
import com.reandroid.dex.smali.model.SmaliInstructionOperand;
2525
import com.reandroid.dex.smali.model.SmaliPayloadPackedSwitch;
26-
import com.reandroid.utils.HexUtil;
2726
import com.reandroid.utils.ObjectsUtil;
2827

2928
import java.io.IOException;
@@ -151,7 +150,7 @@ void toSmaliEntries(SmaliInstruction instruction) {
151150
@Override
152151
public void appendCode(SmaliWriter writer) throws IOException {
153152
getSmaliDirective().append(writer);
154-
writer.append(HexUtil.toHex(firstKey.get(), 1));
153+
writer.appendHex(getFirstKey());
155154
writer.indentPlus();
156155
elements.append(writer);
157156
writer.indentMinus();

src/main/java/com/reandroid/dex/ins/PackedSwitchEntry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ public void append(SmaliWriter writer) throws IOException {
7272
writer.newLine();
7373
writer.appendLabelName(getLabelName());
7474
int value = this.get();
75-
writer.appendComment(HexUtil.toHex(value, 1));
75+
writer.appendComment(HexUtil.toSignedHex(value));
7676
writer.appendResourceIdComment(value);
7777
}
7878

7979
@Override
8080
public void appendExtra(SmaliWriter writer) throws IOException {
8181
writer.appendLabelName(getLabelName());
82-
writer.appendComment(HexUtil.toHex(get(), 1));
82+
writer.appendComment(HexUtil.toSignedHex(get()));
8383
}
8484

8585
@Override

0 commit comments

Comments
 (0)