From 0647bafb7ecf8dde263b73ebd91d541fc53e8f00 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 1 Apr 2019 21:29:55 +0200 Subject: [PATCH] Lua tables are indexed from 1 --- pdns/dnsdist-lua-bindings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index 79e01d2e13..c359d6a150 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -662,7 +662,7 @@ void setupLuaBindings(bool client) g_lua.registerFunction>(EDNSOptionView::*)()>("getValues", [] (const EDNSOptionView& option) { std::vector > values; for (const auto& value : option.values) { - values.push_back(std::make_pair(values.size(), std::string(value.content, value.size))); + values.push_back(std::make_pair(values.size()+1, std::string(value.content, value.size))); } return values; }); -- 2.47.3