mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 00:06:59 +00:00
output: do not skip over first range in mustach output
Off by one that is caused by must_next_range() advancing pointer, and moving over the first range. Fix by setting indexes one step backwards, that is not excellent but better than copying skip_ok stuff to must_enter(). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
50fc4ebe9d
commit
d5ae2a80c0
2 changed files with 32 additions and 1 deletions
|
|
@ -231,9 +231,10 @@ static int must_enter(void *closure, const char *name)
|
|||
if (!strcmp(name, "subnets")) {
|
||||
itf.put = must_put_range;
|
||||
itf.next = must_next_range;
|
||||
e->current = num_ranges;
|
||||
e->current = num_ranges + 1;
|
||||
e->range_p = ranges;
|
||||
/* must_next_range() will skip_ok when needed */
|
||||
e->range_p--;
|
||||
return must_next_range(closure);
|
||||
}
|
||||
if (!strcmp(name, "shared-networks")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue