mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
fix incorrect varlong reader
This commit is contained in:
parent
c7f9dc4b3d
commit
dd2f0465a4
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ impl McBufVarReadable for i64 {
|
|||
fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||
let mut buffer = [0];
|
||||
let mut ans = 0;
|
||||
for i in 0..8 {
|
||||
for i in 0..10 {
|
||||
buf.read_exact(&mut buffer)
|
||||
.map_err(|_| BufReadError::InvalidVarLong)?;
|
||||
ans |= ((buffer[0] & 0b0111_1111) as i64) << (7 * i);
|
||||
|
|
Loading…
Add table
Reference in a new issue