summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/llualib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/llualib.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/llualib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/llualib.c b/Build/source/texk/web2c/luatexdir/lua/llualib.c
index 0586aba026e..d91a9a7294a 100644
--- a/Build/source/texk/web2c/luatexdir/lua/llualib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/llualib.c
@@ -319,8 +319,8 @@ static int set_luaname(lua_State * L)
{
int k;
const char *s;
- if (lua_gettop(L) == 3) {
- k = (int) luaL_checkinteger(L, 2);
+ if (lua_gettop(L) == 2) {
+ k = (int) luaL_checkinteger(L, 1);
if (k > 65535 || k < 0) {
/* error */
} else {
@@ -328,8 +328,8 @@ static int set_luaname(lua_State * L)
free(luanames[k]);
luanames[k] = NULL;
}
- if (lua_type(L,3) == LUA_TSTRING) {
- s = lua_tostring(L, 3);
+ if (lua_type(L, 2) == LUA_TSTRING) {
+ s = lua_tostring(L, 2);
if (s != NULL)
luanames[k] = xstrdup(s);
}
@@ -340,7 +340,7 @@ static int set_luaname(lua_State * L)
static int get_luaname(lua_State * L)
{
- int k = (int) luaL_checkinteger(L, 2);
+ int k = (int) luaL_checkinteger(L, 1);
if (k > 65535 || k < 0) {
/* error */
lua_pushnil(L);