wrap only non-null rdata parsers with h_end_p

This commit is contained in:
Sven M. Hallberg 2013-01-23 16:55:26 +01:00
parent 8dea41c237
commit d0d115f206

View file

@ -181,8 +181,10 @@ const HParser* init_rdata(uint16_t type) {
// All parsers must consume their input exactly.
for(uint16_t i; i<sizeof(parsers); i++) {
parsers[i] = h_action(h_sequence(parsers[i], h_end_p(), NULL),
act_index0);
if(parsers[i]) {
parsers[i] = h_action(h_sequence(parsers[i], h_end_p(), NULL),
act_index0);
}
}
inited = 1;