Merge "Fix unwanted sign-extention when converting byte -> int"

This commit is contained in:
Treehugger Robot
2022-02-22 02:34:49 +00:00
committed by Gerrit Code Review

View File

@@ -177,7 +177,7 @@ public class SparseInputStream extends InputStream {
ret = 0;
break;
case SparseChunk.FILL:
ret = mCur.fill[(4 - ((int) mLeft & 0x3)) & 0x3];
ret = Byte.toUnsignedInt(mCur.fill[(4 - ((int) mLeft & 0x3)) & 0x3]);
break;
default:
throw new IOException("Unsupported Chunk:" + mCur.toString());