diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-26 19:42:52 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-26 22:18:52 +0100 |
commit | 5934913790078037b677982c4cd138876e3ee4ee (patch) | |
tree | b5b9ab17abb314941cf7d832f68d61bfd156a57c | |
parent | 6d81ea596bebc41466a697c431481d6b862e9e1a (diff) | |
download | hex-5934913790078037b677982c4cd138876e3ee4ee.tar.gz hex-5934913790078037b677982c4cd138876e3ee4ee.tar.xz hex-5934913790078037b677982c4cd138876e3ee4ee.zip |
Lua: fix setting chunk.position
Double decrement.
-rw-r--r-- | hex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -975,9 +975,9 @@ app_lua_chunk_newindex (lua_State *L) } else if (!strcmp (key, "position")) { - lua_Integer position = luaL_checkinteger (L, 3) - 1; + lua_Integer position = luaL_checkinteger (L, 3); if (position < 1 || position > self->len + 1) - return luaL_error (L, "position out of range: %" PRId64, position); + return luaL_error (L, "position out of range: %I", position); self->position = position - 1; } else |