JesusFreke/smali

Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: -1

SharkFall opened this issue · 0 comments

HI JesuFreke,thank you for your reading

this is all of the errors:
W/System.err: org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroid/support/v4/app/INotificationSideChannel;->ja(Ljava/lang/String;)Ljava/lang/String;
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1058)
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:354)
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:309)
W/System.err: at sharkfall.inc.test.test(test.java:66)
W/System.err: Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x0
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1331)
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1054)
W/System.err: ... 15 more
W/System.err: Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: -1
W/System.err: at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
W/System.err: at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:183)
W/System.err: at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1240)
W/System.err: ... 16 more

this is smali method:
.method private static ja(Ljava/lang/String;)Ljava/lang/String;
.registers 6

new-instance v1, Ljava/lang/StringBuilder;

invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

invoke-virtual {p0}, Ljava/lang/String;->toCharArray()[C

move-result-object v2

const/4 v0, 0x0

:goto_a
array-length v3, v2

if-ge v0, v3, :cond_3e

rem-int/lit8 v3, v0, 0x4

packed-switch v3, :pswitch_data_44

aget-char v3, v2, v0

xor-int/lit8 v3, v3, -0x1

int-to-char v3, v3

invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

:goto_1a
add-int/lit8 v0, v0, 0x1

goto :goto_a

:pswitch_1d
aget-char v3, v2, v0

const v4, 0x40b27

xor-int/2addr v3, v4

int-to-char v3, v3

invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

goto :goto_1a

:pswitch_28
aget-char v3, v2, v0

const v4, 0x5863c4a9

xor-int/2addr v3, v4

int-to-char v3, v3

invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

goto :goto_1a

:pswitch_33
aget-char v3, v2, v0

const v4, 0x525978fe

xor-int/2addr v3, v4

int-to-char v3, v3

invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

goto :goto_1a

:cond_3e
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v0

return-object v0

nop

:pswitch_data_44
.packed-switch 0x0
    :pswitch_1d
    :pswitch_28
    :pswitch_33
.end packed-switch

.end method