From ab81db9b2205f7521ec29a93abe0bae9892730b1 Mon Sep 17 00:00:00 2001 From: Benoit Branciard Date: Fri, 5 Apr 2024 13:41:39 +0200 Subject: [PATCH] Fix Lua odkim.del_header() to actually delete the requested header number instead of the first one --- opendkim/opendkim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendkim/opendkim.c b/opendkim/opendkim.c index 803f37b0..b7b45d0d 100644 --- a/opendkim/opendkim.c +++ b/opendkim/opendkim.c @@ -3719,7 +3719,7 @@ dkimf_xs_delheader(lua_State *l) if (ctx == NULL) lua_pushnil(l); - else if (dkimf_chgheader(ctx, name, 1, NULL) == MI_SUCCESS) + else if (dkimf_chgheader(ctx, name, idx+1, NULL) == MI_SUCCESS) lua_pushnumber(l, 1); else lua_pushnil(l);