Skip to content

Commit

Permalink
Fix magic number check
Browse files Browse the repository at this point in the history
How did I not see that? That wasn't supposed to be a tautology.
  • Loading branch information
xylo04 committed Nov 26, 2020
1 parent 8ca8d76 commit 5db6f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type parser struct {
// received by WSJT-X.
func parseMessage(buffer []byte, length int) interface{} {
p := parser{buffer: buffer, length: length, cursor: 0}
magic := p.parseUint32()
if magic != magic {
m := p.parseUint32()
if m != magic {
// Packet is not speaking the WSJT-X protocol
return nil
}
Expand Down

0 comments on commit 5db6f06

Please sign in to comment.