mirror of
https://github.com/revanced/smali.git
synced 2025-05-04 08:34:25 +02:00
Fixed issue decoding signed ints and shorts
git-svn-id: https://smali.googlecode.com/svn/trunk@167 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
fa07a1972e
commit
dc4bcbe0c0
@ -48,7 +48,7 @@ public class NumberUtils {
|
||||
|
||||
public static short decodeShort(byte lsb, byte msb) {
|
||||
return (short)
|
||||
( lsb |
|
||||
( (lsb & 0xFF) |
|
||||
(msb << 8)
|
||||
);
|
||||
}
|
||||
@ -59,9 +59,9 @@ public class NumberUtils {
|
||||
}
|
||||
|
||||
public static int decodeInt(byte lsb, byte mlsb, byte mmsb, byte msb) {
|
||||
return lsb |
|
||||
(mlsb << 8) |
|
||||
(mmsb << 16) |
|
||||
return (lsb & 0xFF) |
|
||||
((mlsb & 0xFF) << 8) |
|
||||
((mmsb & 0xFF) << 16) |
|
||||
(msb << 24);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user