diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-02 12:59:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-02 12:59:48 +0000 |
commit | 0fba996c14f13fc489663ff83ac7363295a475ef (patch) | |
tree | 325d49cb75e01489809969b20ce056688493a242 /Build/source/texk/web2c/luatexdir/lua/lnodelib.c | |
parent | b9a5638378c7ec50deb5cb387b99d95c6ae47a46 (diff) |
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/lnodelib.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lnodelib.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c index d8c23b75c1f..2b44f6facad 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c @@ -984,11 +984,15 @@ static int lua_nodelib_direct_getboth(lua_State * L) static int lua_nodelib_subtype(lua_State * L) { - int i = get_node_type_id_from_name(L,1,whatsit_node_data); - if (i >= 0) { - lua_pushinteger(L, i); + if (lua_type(L,1) == LUA_TSTRING) { + int i = get_node_type_id_from_name(L,1,whatsit_node_data); + if (i >= 0) { + lua_pushinteger(L, i); + } else { + lua_pushnil(L); + } } else { - lua_pushnil(L); /* return 0; */ + lua_pushnil(L); } return 1; } |