Replacing the contents of 'run_lua' with:
struct lua_coroutine *co = load_lua_coroutine(target, code);
while (!resume_lua_coroutine(co)) ;
lua_pop(get_lua_state(target), 1);
free(co);
return 0;
solves the issue, but the return value is lost so it's not a solution. |