diff options
author | Plex <thinkplex@riseup.net> | 2021-10-24 23:49:00 +0200 |
---|---|---|
committer | Plex <thinkplex@riseup.net> | 2021-10-24 23:49:00 +0200 |
commit | a5099fdeec6f5e45d88108e28e7c00aa1cf3573c (patch) | |
tree | 5298b6ab774831304bab218d58a9ca25f332fb35 /mctypes.c | |
parent | d937614705989b9e71c366e5fe61751ba0d1a2eb (diff) |
forgot to strip most significant bytes from read
Diffstat (limited to 'mctypes.c')
-rw-r--r-- | mctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -40,7 +40,7 @@ int readVarInt(varint x) unsigned int res = 0; do { if(offset == 5) exit(EXIT_FAILURE); - res |= x[offset] << offset*7; + res |= (x[offset] & 0b01111111) << offset*7; offset++; } while ((x[offset-1] & 0b10000000) != 0); return (int) res; |