diff options
-rw-r--r-- | src/tools.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools.c b/src/tools.c index f9b34be..0c07a3b 100644 --- a/src/tools.c +++ b/src/tools.c | |||
@@ -1593,7 +1593,8 @@ static void lookup_native_func( lua_State* L2, lua_State* L, uint_t i, enum eLoo | |||
1593 | from = lua_tostring( L, -1); | 1593 | from = lua_tostring( L, -1); |
1594 | lua_getglobal( L2, "decoda_name"); // {} f decoda_name | 1594 | lua_getglobal( L2, "decoda_name"); // {} f decoda_name |
1595 | to = lua_tostring( L2, -1); | 1595 | to = lua_tostring( L2, -1); |
1596 | (void) luaL_error( L, "%s: function '%s' not found in %s destination transfer database.", from ? from : "main", fqn, to ? to : "main"); | 1596 | // when mode_ == eLM_FromKeeper, L is a keeper state and L2 is not, therefore L2 is the state where we want to raise the error |
1597 | (void) luaL_error( (mode_ == eLM_FromKeeper) ? L2 : L, "%s: function '%s' not found in %s destination transfer database.", from ? from : "main", fqn, to ? to : "main"); | ||
1597 | return; | 1598 | return; |
1598 | } | 1599 | } |
1599 | lua_remove( L2, -2); // f | 1600 | lua_remove( L2, -2); // f |