Ais.Net.Receiver icon indicating copy to clipboard operation
Ais.Net.Receiver copied to clipboard

NmeaPayloadParser.PeekMessageType returns a signed int

Open idg10 opened this issue 3 years ago • 0 comments

Message type values are always in the range 0-47 inclusive, because there are only 6 bits available to hold the message type, and by definition they are non-negative.

While all of the various message parsers reflect this by defining a property of the form public uint MessageType => ..., the NmeaPayloadParser.PeekMessageType method inexplicably returns an int.

I can't think of any good reason why I would have done that, so I believe this was a simple mistake.

Since we're still in v0.x versioning, it's not technically a semver violation to fix this.

idg10 avatar Mar 03 '21 07:03 idg10