[luatex] Removed node still has prev and next.

Paul Isambert zappathustra at free.fr
Wed Nov 9 11:11:20 CET 2011


Hello all,

I think that's a bug but I'd rather get some input here before polluting
the bug tracker. The problem is, when a node is removed from a list, its
"prev" and "next" fields still point to its former neighbours. See:

     \setbox0=\hbox{aaa}

     \directlua{%
     local n = tex.box[0].head.next
     tex.box[0].head = node.remove(tex.box[0].head, n)
     print("\string\n", tex.box[0].head)
     print("\string\n", n)
     print("\string\n", node.tail(tex.box[0].head))
     }

     \bye

which prints:

<node nil < 181 > 197 : glyph 0>
<node 181 < 191 > 197 : glyph 0>
<node 181 < 197 > nil : glyph 0>

I'd expect

<node nil < 191 > nil : glyph 0>

for the second line.

Best,
Paul



More information about the luatex mailing list