Skip to content

Commit

Permalink
fix(typo): initial variable during input parsing
Browse files Browse the repository at this point in the history
This was probably a typo since the `w` gets set again during
`detectOneMsg` it wouldn't make sense to initially set it to `07` and it
makes the code confusing.

Fixes: a154847 (feat: extended Coordinates mouse reporting & additional buttons support (#594))
  • Loading branch information
aymanbagabas committed Mar 1, 2024
1 parent 8df2989 commit aaf740e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion key.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ loop:
canHaveMoreData := numBytes == len(buf)

var i, w int
for i, w = 0, 07; i < len(b); i += w {
for i, w = 0, 0; i < len(b); i += w {
var msg Msg
w, msg = detectOneMsg(b[i:], canHaveMoreData)
if w == 0 {
Expand Down

0 comments on commit aaf740e

Please sign in to comment.