commit | d7b7e6c0d2568d55bcad07c459f60e9885e4d652 | [log] [tgz] |
---|---|---|
author | Michael W <baddaemon87@gmail.com> | Sat Dec 03 12:28:28 2022 +0100 |
committer | Bruno Martins <bgcngm@gmail.com> | Tue Dec 06 18:21:52 2022 +0100 |
tree | 057742eb19676381dbf9d76123cf348ad38eabde | |
parent | 8a0bc2b53e04f0d515d0f0bccec115f229c7fe0a [diff] |
NFCProfileUtils: Fix shifting operation * Fixes Shift operation '>>>' by out-of-bounds value {-64..-8}: divisible by 8 * Tested by calling asByteArray() and then toUUID() on that, logging both -> Result is equal Change-Id: I5f531f2e12a0cec752c98a9e548f271867f46978
diff --git a/src/org/lineageos/lineageparts/profiles/NFCProfileUtils.java b/src/org/lineageos/lineageparts/profiles/NFCProfileUtils.java index 2c1ca0e..8eadf90 100644 --- a/src/org/lineageos/lineageparts/profiles/NFCProfileUtils.java +++ b/src/org/lineageos/lineageparts/profiles/NFCProfileUtils.java
@@ -111,9 +111,7 @@ for (int i = 0; i < 8; i++) { buffer[i] = (byte) (msb >>> 8 * (7 - i)); - } - for (int i = 8; i < 16; i++) { - buffer[i] = (byte) (lsb >>> 8 * (7 - i)); + buffer[i + 8] = (byte) (lsb >>> 8 * (7 - i)); } return buffer;