diff --git a/src/Service.cpp b/src/Service.cpp index 9bef47f..cbe513f 100644 --- a/src/Service.cpp +++ b/src/Service.cpp @@ -76,6 +76,8 @@ LuaService::LuaService(LuaService&& service) noexcept { lua = service.lua; service.lua = nullptr; name = std::move(service.name); + loaded = false; + started = false; } LuaService& LuaService::operator=(LuaService&& service) noexcept { @@ -88,9 +90,9 @@ LuaService& LuaService::operator=(LuaService&& service) noexcept { void LuaService::load() { if (!loaded) { - if (lua_pcall(lua, 0, 0 ,0) != 0) { + if (lua_pcall(lua, 0, 0 ,0) == 0) { loaded = true; - + }else{ spdlog::error("[{}] Unable to call 'lua_pcall()' in load(). [Lua: '{}']", name, lua_tostring(lua,-1)); } } diff --git a/src/Version.h b/src/Version.h index ed41a91..eea9ec8 100644 --- a/src/Version.h +++ b/src/Version.h @@ -3,6 +3,6 @@ #define THRAWN_MAJOR_VERSION 1 #define THRAWN_MINOR_VERSION 0 -#define THRAWN_PATCH_VERSION 3 +#define THRAWN_PATCH_VERSION 4 #endif // VERSION_H