From d0d115f20617cc303ee027255df7d832bdadf3b3 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" <pesco@khjk.org> Date: Wed, 23 Jan 2013 16:55:26 +0100 Subject: [PATCH] wrap only non-null rdata parsers with h_end_p --- examples/rr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/rr.c b/examples/rr.c index 6bfb7821..8aa48e67 100644 --- a/examples/rr.c +++ b/examples/rr.c @@ -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; -- GitLab