Lua: fix __len for chunks

This commit is contained in:
2017-01-18 02:33:19 +01:00
parent b368d11415
commit 57fec13e3a

2
hex.c
View File

@@ -911,7 +911,7 @@ app_lua_chunk_len (lua_State *L)
{ {
struct app_lua_chunk *self = luaL_checkudata (L, 1, XLUA_CHUNK_METATABLE); struct app_lua_chunk *self = luaL_checkudata (L, 1, XLUA_CHUNK_METATABLE);
lua_pushinteger (L, self->len); lua_pushinteger (L, self->len);
return 0; return 1;
} }
/// Create a new subchunk following Lua's string.sub() semantics. /// Create a new subchunk following Lua's string.sub() semantics.