@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
@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"