Skip to content

Commit 2bedb1a

Browse files
committed
use unsigned shifting
1 parent 2070955 commit 2bedb1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/reandroid/arsc/item/StringItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ private static byte[] encodeUtf16ToBytes(String str) {
553553
lenBytes[3] = (byte) (high >> 8);
554554
lenBytes[2] = (byte) low;
555555
low = rem & 0xff;
556-
high = (rem & 0xff00) >> 8;
556+
high = rem >>> 8;
557557
lenBytes[1] = (byte) (high | 0x80);
558558
lenBytes[0] = (byte) low;
559559
} else {

src/main/java/com/reandroid/arsc/value/array/ArrayBag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static boolean isArray(Entry entry) {
156156
while (iterator.hasNext()) {
157157
ResValueMap resValueMap = iterator.next();
158158
int name = resValueMap.getNameId();
159-
int high = (name >> 16) & 0xffff;
159+
int high = name >>> 16;
160160
if(high != 0x0100){
161161
return false;
162162
}

0 commit comments

Comments
 (0)