Limit the number of records for the Predator

In the older Predator-like data format, the 4th opening/closing record
is the last one. To avoid accidental use of the higher ones, leave them
undefined.
This commit is contained in:
Jef Driesen 2022-02-07 22:12:25 +01:00
parent 54fa676e75
commit 86e1d59a6a

View File

@ -373,7 +373,7 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser)
// byte opening and closing block. To minimize the differences
// with the PNF format, all record offsets are assigned the same
// value here.
for (unsigned int i = 0; i < NRECORDS; ++i) {
for (unsigned int i = 0; i <= 4; ++i) {
parser->opening[i] = 0;
parser->closing[i] = size - footersize;
}