diff --git a/Library/MeasureScript.cpp b/Library/MeasureScript.cpp index bf9f4113..f4853c6b 100644 --- a/Library/MeasureScript.cpp +++ b/Library/MeasureScript.cpp @@ -142,10 +142,13 @@ void CMeasureScript::ReadConfig(CConfigParser& parser, const WCHAR* section) // Read common configs CMeasure::ReadConfig(parser, section); - m_ScriptFile = ConvertToAscii(parser.ReadString(section, L"ScriptFile", L"").c_str()); + std::wstring file = parser.ReadString(section, L"ScriptFile", L""); - if (!m_ScriptFile.empty()) + if (!file.empty()) { + file = m_MeterWindow->MakePathAbsolute(file); + m_ScriptFile = ConvertToAscii(file.c_str()); + if (!m_Initialized || oldScriptFile != m_ScriptFile) { diff --git a/Library/lua/LuaScript.cpp b/Library/lua/LuaScript.cpp index a8d869ee..0b0d12fd 100644 --- a/Library/lua/LuaScript.cpp +++ b/Library/lua/LuaScript.cpp @@ -98,7 +98,7 @@ bool LuaScript::IsFunction(const char* funcName) { bool bExists = false; - if (m_Initialized && funcName) + if (m_Initialized) { // Push our table onto the stack PushTable(); @@ -244,4 +244,4 @@ void LuaScript::RunString(const char* str) // // //lua_pop(m_pLuaScript->GetState(), 1); //} -// \ No newline at end of file +//