SubOptions (NoLocal,RetainAsPublished) always get false.
BANice opened this issue · comments
BANice commented
Describe the bug
// it expect equal 0x04 not 0x01
s.NoLocal = (b & 1 << 2) == 1
To reproduce
make a client and sub topic with (NoLocal,RetainAsPublished) =true. Unpack function will always get false.
Debug output
Any debugging output provided by the client code while reproducing the bug (either embedded to link to the output)
Expected behaviour
BANice commented
I will PR it late.
Matt Brittan commented
I've found and fixed a few variations of this in the large change I'm working on. For reference the approach I've used is b&(1<<2) != 0
.
BANice commented
great. Thanks.
Matt Brittan commented
Had not fixed this specific issue yet (that was the approach Ive used for other flags). Reopened this to ensure it's not forgotten.