aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-26 20:05:08 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-26 22:18:53 +0100
commit2b6f43d4283e7d7c071c467010fde787a982bbae (patch)
treeef878edd24df5c6eb743a9ebd186e052d35ed079
parent76d689c69191b7c8ff299fb43060c84dfc9796da (diff)
downloadhex-2b6f43d4283e7d7c071c467010fde787a982bbae.tar.gz
hex-2b6f43d4283e7d7c071c467010fde787a982bbae.tar.xz
hex-2b6f43d4283e7d7c071c467010fde787a982bbae.zip
Lua: fix non-marking reads
-rw-r--r--hex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hex.c b/hex.c
index 532b539..ea09f04 100644
--- a/hex.c
+++ b/hex.c
@@ -1099,7 +1099,10 @@ app_lua_chunk_finish_read
{
int n_args = lua_gettop (L) - 1;
if (n_args < 2)
+ {
+ self->position += len;
return;
+ }
// Prepare <string.format>, <format>, <value>
lua_rawgeti (L, LUA_REGISTRYINDEX, g_ctx.ref_format);