From 5db6f06ffcd8feda03a27c3f3c73821f1b9282bf Mon Sep 17 00:00:00 2001 From: Chris Keller Date: Wed, 25 Nov 2020 19:29:26 -0700 Subject: [PATCH] Fix magic number check How did I not see that? That wasn't supposed to be a tautology. --- parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.go b/parser.go index eb92ca6..cd1e1d7 100644 --- a/parser.go +++ b/parser.go @@ -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 }