go-astits
go-astits copied to clipboard
PSI: parse multiple sections correctly
cc #25
Coverage decreased (-76.6%) to 0.0% when pulling d1f8a96c02d311684fb93ed419f54b624476c2f6 on tmm1:psi-parse-multiple into 077af8e17e39a8c822c46bd662cbf8ad6ea90a44 on asticode:master.
To be honest I don't quite get why removing || tableID.isUnknown() would fix your issue here 🤔 Can you explain it a little bit?
The issue was that when an unknown table was seen previously, parsing stopped altogether. This means that a known table later in the same packet (such as the program_map) was ignored altogether.
OK, got it. In that case, I feel like doing the following would better fix the problem and clean everything behind:
- Remove the
shouldStopPSIParsingfunction - Make sure the
parsePSISectionHeaderfunction returnsstopand upon calling it, add anelse if stop { return }(and hence remove theif shouldStopPSIParsing(s.Header.TableID)below) - Replace this if with
if tableID == PSITableIDNulldirectly - Remove this function
What do you think?