diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-27 04:02:21 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-27 04:02:21 +0100 |
commit | caa740df79f1475374e0d0e0481567d120bd3789 (patch) | |
tree | eed05c24f042f6782491f04936ad47e64824256a | |
parent | 416b52083d2357b950b3428364bf8e5548d0a23a (diff) | |
download | hex-caa740df79f1475374e0d0e0481567d120bd3789.tar.gz hex-caa740df79f1475374e0d0e0481567d120bd3789.tar.xz hex-caa740df79f1475374e0d0e0481567d120bd3789.zip |
Lua: don't die on unspecified detectors
-rw-r--r-- | hex.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1037,6 +1037,9 @@ app_lua_chunk_identify (lua_State *L) struct app_lua_coder *coder; while ((coder = str_map_iter_next (&iter))) { + if (coder->ref_detect == LUA_REFNIL) + continue; + lua_rawgeti (L, LUA_REGISTRYINDEX, coder->ref_detect); // Clone the chunk first to reset its read position |