libais
libais copied to clipboard
Ais6_1_4 message is always parsed incorrectly. (Crash)
@schwehr Can you please comment if it is safe (or not) to uncomment the line that parses spare2? Or should we change the assert to bs.GetRemaining() == 0 || bs.GetRemaining() ==6. This is okay only if application does not use spare2.
The following string consistently reproduces it. "!AIVDM,1,1,,A,64R:gF00UBf004@0@2000020000002000000000,2*18"
// spare2 = bs.ToUnsignedInt(226, 6); // OR NOT
// TODO(schwehr): add in the offset of the dest mmsi
assert(bs.GetRemaining() == 0); <== This crashes
I could really use a donation of several messages, not just one to help make better tests.
@schwehr Thank you very much for the response. I am using the following data set for testing.
http://www.aishub.net/nmea-sample.php