# HG changeset patch # User bsw # Date 1612819373 -3600 # Node ID 8e4fed8767727005e989f524782a5e38771a2e73 # Parent bbb537ba81b2424a6f3353f58836ec5e08956be6 Bugfix for nattrs > 1 diff -r bbb537ba81b2 -r 8e4fed876772 lib/mldap/mldap.c --- a/lib/mldap/mldap.c Mon Feb 08 16:26:21 2021 +0100 +++ b/lib/mldap/mldap.c Mon Feb 08 22:22:53 2021 +0100 @@ -350,7 +350,7 @@ free(attrs); return luaL_error(L, "Element in attribute list is not a string"); } - attrs[i] = lua_tostring(L, -1); + attrs[attr_idx] = lua_tostring(L, -1); } // attrs[nattrs] = NULL; // unnecessary due to calloc