Greetings, it looks like node.protect_glyph changes a subtype of 256 to
512, and node.unprotect_glyph does not change a subtype of 256 to 0. Are
the following changes correct:
--- a/source/texk/web2c/luatexdir/lua/lnodelib.c
+++ b/source/texk/web2c/luatexdir/lua/lnodelib.c
@@ -6151,7 +6151,7 @@ static int lang_tex_direct_hyphenating(lua_State * L)
#define protect_one_indeed(n) \
if (n != null) { \
int s = subtype(n); \
- if (s <= 256) { \
+ if (s < 256) { \
subtype(n) = (quarterword) (s == 1 ? 256 : 256 + s); \
} \
}
@@ -6162,7 +6162,7 @@ static int lang_tex_direct_hyphenating(lua_State * L)
while (h != null) { \
if (type(h) == glyph_node) { \
int s = subtype(h); \
- if (s <= 256) { \
+ if (s < 256) { \
subtype(h) = (quarterword) (s == 1 ? 256 : 256 + s); \
} \
} \
@@ -6182,7 +6182,7 @@ static int lang_tex_direct_hyphenating(lua_State * L)
#define unprotect_one_indeed(n) \
if (n != null) { \
int s = subtype(n); \
- if (s > 256) { \
+ if (s >= 256) { \
subtype(n) = (quarterword) (s - 256); \
} \
}
@@ -6193,7 +6193,7 @@ static int lang_tex_direct_hyphenating(lua_State * L)
while (h != null) { \
if (type(h) == glyph_node) { \
int s = subtype(h); \
- if (s <= 256) { \
+ if (s >= 256) { \
subtype(h) = (quarterword) (s - 256); \
} \
} \
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]