From 57fec13e3afe43a4e903c9298bc0be147a01a118 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 18 Jan 2017 02:33:19 +0100 Subject: Lua: fix __len for chunks --- hex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hex.c b/hex.c index 5289bc5..be744c1 100644 --- a/hex.c +++ b/hex.c @@ -911,7 +911,7 @@ app_lua_chunk_len (lua_State *L) { struct app_lua_chunk *self = luaL_checkudata (L, 1, XLUA_CHUNK_METATABLE); lua_pushinteger (L, self->len); - return 0; + return 1; } /// Create a new subchunk following Lua's string.sub() semantics. -- cgit v1.2.3-70-g09d2