Merge "Fix unwanted sign-extention when converting byte -> int" am: dc59956478 am: ebf3f814e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993170 Change-Id: Ibefe1575a977c1e6b990f3553e6c10a5d2a32162
This commit is contained in:
@@ -177,7 +177,7 @@ public class SparseInputStream extends InputStream {
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case SparseChunk.FILL:
|
case SparseChunk.FILL:
|
||||||
ret = mCur.fill[(4 - ((int) mLeft & 0x3)) & 0x3];
|
ret = Byte.toUnsignedInt(mCur.fill[(4 - ((int) mLeft & 0x3)) & 0x3]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IOException("Unsupported Chunk:" + mCur.toString());
|
throw new IOException("Unsupported Chunk:" + mCur.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user