[latex3-commits] [git/LaTeX3-latex3-latex2e] callback_rules: Fix bug duplicating handlers (d2bdc253)

Marcel Fabian Krüger tex at 2krueger.de
Sun Sep 4 14:17:55 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : callback_rules
Link       : https://github.com/latex3/latex2e/commit/d2bdc253e6aa839574d2290c99bfa93d16c277da

>---------------------------------------------------------------

commit d2bdc253e6aa839574d2290c99bfa93d16c277da
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun Sep 4 14:13:51 2022 +0200

    Fix bug duplicating handlers


>---------------------------------------------------------------

d2bdc253e6aa839574d2290c99bfa93d16c277da
 base/ltluatex.dtx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/base/ltluatex.dtx b/base/ltluatex.dtx
index 06361a9f..9d9b85ff 100644
--- a/base/ltluatex.dtx
+++ b/base/ltluatex.dtx
@@ -1359,7 +1359,9 @@ local callbacklist = setmetatable({}, {
             if post_count == 0 then
               local post_pos = post.pos
               if post_pos ~= pos then
-                list[post_pos] = list[pos]
+                local new_post_pos = list[pos]
+                new_post_pos.pos = post_pos
+                list[post_pos] = new_post_pos
               end
               list[pos] = nil
               pos = pos - 1





More information about the latex3-commits mailing list.