aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-18 02:33:19 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-18 02:35:55 +0100
commit57fec13e3afe43a4e903c9298bc0be147a01a118 (patch)
treeefa55c6147e460fc8c42034f3ce509be7b387295
parentb368d1141558357236dc9973ea8f8515cb22912c (diff)
downloadhex-57fec13e3afe43a4e903c9298bc0be147a01a118.tar.gz
hex-57fec13e3afe43a4e903c9298bc0be147a01a118.tar.xz
hex-57fec13e3afe43a4e903c9298bc0be147a01a118.zip
Lua: fix __len for chunks
-rw-r--r--hex.c2
1 files changed, 1 insertions, 1 deletions
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.