On Mon, Nov 9, 2020 at 8:21 AM Marcel Fabian Krüger <tex@2krueger.de> wrote:
Hi,

as recently discussed on the luatex list there is an issue regarding
hyphenation ehn a frozen glyph appears next to an explicit hyphenation
character. E.g.

\setbox0\hbox{X}
X-\unhbox0
\bye

triggers an assertion error. I noticed that with the latest experimental
code a TeX error is triggered instead but IMO this should not be an
error. Therefore I suggest to fix this by treating glyph nodes failing
is_simple_character just like non-glyph nodes, e.g. with

---
 source/texk/web2c/luatexdir/lang/texlang.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/texk/web2c/luatexdir/lang/texlang.c b/source/texk/web2c/luatexdir/lang/texlang.c
index 48a242fa0..e7635903a 100644
--- a/source/texk/web2c/luatexdir/lang/texlang.c
+++ b/source/texk/web2c/luatexdir/lang/texlang.c
@@ -1049,7 +1049,7 @@ void hnj_hyphenation(halfword head, halfword tail)
         if (explicit_hyphen == true) {
             /*tex we are not at the start, so we only need to look ahead */
             halfword t = vlink(r) ;
-            if ((automatic_hyphen_mode_par == 0 || automatic_hyphen_mode_par == 1) && (t != null) && ((type(t) == glyph_node) && (character(t) != ex_hyphen_char_par))) {
+            if ((automatic_hyphen_mode_par == 0 || automatic_hyphen_mode_par == 1) && (t != null) && ((type(t) == glyph_node) && is_simple_character(t) && (character(t) != ex_hyphen_char_par))) {
                 /*tex we have a word already but the next character may not be a hyphen too */
                 r = compound_word_break(r, char_lang(r));
                 if (compound_hyphen) {
@@ -1063,7 +1063,7 @@ void hnj_hyphenation(halfword head, halfword tail)
                 }
             } else {
                 /*tex we jump over the sequence of hyphens */
-               while ((t != null) && (type(t) == glyph_node) && (character(t) == ex_hyphen_char_par)) {
+               while ((t != null) && (type(t) == glyph_node) && is_simple_character(t) && (character(t) == ex_hyphen_char_par)) {
                     r = t ;
                     t = vlink(r) ;
                 }
--
2.29.2

Best regards,
Marcel

 
ok, I will see it this weekend.

--
luigi