mirror of
https://github.com/pxb1988/dex2jar.git
synced 2025-02-20 05:02:23 +00:00
fix bug in lengthOfUleb128
--HG-- branch : 2.x
This commit is contained in:
parent
52174ca6f6
commit
46bda9e8e7
@ -60,19 +60,12 @@ public abstract class BaseItem {
|
||||
return count;
|
||||
}
|
||||
|
||||
public static int lengthOfUleb128(final int s) {
|
||||
public static int lengthOfUleb128(int value) {
|
||||
int remaining = value >>> 7;
|
||||
int length = 1;
|
||||
if (s > 0x7f) {
|
||||
while (remaining != 0) {
|
||||
length++;
|
||||
if (s > (0x3fff)) {
|
||||
length++;
|
||||
if (s > (0x1fffff)) {
|
||||
length++;
|
||||
if (s > (0xfffffff)) {
|
||||
length++;
|
||||
}
|
||||
}
|
||||
}
|
||||
remaining >>>= 7;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user