mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-19 20:28:02 +07:00
Fixed bug where readSafe64u was reading 32u
This commit is contained in:
@ -426,13 +426,13 @@ public class ByteInput {
|
|||||||
*
|
*
|
||||||
* @throws UnsafeNarrowing if the read value is larger than 63 bits.
|
* @throws UnsafeNarrowing if the read value is larger than 63 bits.
|
||||||
*
|
*
|
||||||
* @see #read32u()
|
* @see #read64()
|
||||||
*/
|
*/
|
||||||
public long readSafe64u() {
|
public long readSafe64u() {
|
||||||
assert aligned() : "not aligned";
|
assert aligned() : "not aligned";
|
||||||
try {
|
try {
|
||||||
final long value = read32u(); // increments bits
|
final long value = read64(); // increments bits
|
||||||
return BitConstraints.safe32u(value);
|
return BitConstraints.safe64u(value);
|
||||||
} catch (IndexOutOfBoundsException t) {
|
} catch (IndexOutOfBoundsException t) {
|
||||||
throw new EndOfInput(t);
|
throw new EndOfInput(t);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user