summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-07 18:12:54 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-07 18:12:54 +0200
commitea883f6348d13018179627d5ffd63f22bf843a9f (patch)
tree756777c517c695f52f4af1a6d56d78b2851769e6
parent7458a83c249fca6333e9486395363503b09e5321 (diff)
downloadluatexbase-ea883f6348d13018179627d5ffd63f22bf843a9f.tar.gz
do some basic validation on a node before accepting it as whatsit
-rw-r--r--luatexbase-attr.dtx5
1 files changed, 4 insertions, 1 deletions
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index ed60cf7..99b853a 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -539,7 +539,10 @@ local new_user_whatsit = function (name, package)
--- unit -> node_t
local generator = function (proto)
local res
- if proto then
+ if proto
+ and proto.id == whatsit_t
+ and proto.subtype == user_defined_t
+ then
local proto_id = proto.user_id
if proto_id ~= id then --- mismatch
warning("overriding user_id %d of whatsit prototype (now: %d)",