Commit a263bb9
authored
Fix computeChatChecksum returning unsigned byte for i8 schema (#1485)
The chat_command_signed packet schema defines the checksum as i8 (-128..127),
but computeChatChecksum was returning the result of '& 0xff' (0..255). When
the masked value exceeded 127, sending any signed chat command crashed with
RangeError on MC 1.21.11.
Convert the unsigned byte to signed range before returning. Closes #1482.1 parent 3fabf16 commit a263bb9
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
0 commit comments