forked from Mirror/frr
lib: Start from 1, not 0 when creating Lua tables for nexthops
Lua technically enumerates arrays from 1, not 0. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
3d2c589766
commit
b1012b693f
|
@ -323,7 +323,7 @@ void lua_pushnexthop_group(lua_State *L, const struct nexthop_group *ng)
|
||||||
{
|
{
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
struct nexthop *nexthop;
|
struct nexthop *nexthop;
|
||||||
int i = 0;
|
int i = 1;
|
||||||
|
|
||||||
for (ALL_NEXTHOPS_PTR(ng, nexthop)) {
|
for (ALL_NEXTHOPS_PTR(ng, nexthop)) {
|
||||||
lua_pushnexthop(L, nexthop);
|
lua_pushnexthop(L, nexthop);
|
||||||
|
|
Loading…
Reference in a new issue