diff options
author | aunsane <aunsane@gmail.com> | 2018-06-27 21:44:52 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-06-27 21:45:11 +0300 |
commit | 3634b36ee285468f6514a3143bc99d78a3e8f51f (patch) | |
tree | 9c596492a6412ce4c8e610955cf444c4f4f3685d /plugins/MirLua | |
parent | 5a766d7cce12012a3b27d899b6c7f7d24a776f8c (diff) |
Fix lua script path
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/src/script_loader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/MirLua/src/script_loader.cpp b/plugins/MirLua/src/script_loader.cpp index cf9c194ec1..4782d3ea85 100644 --- a/plugins/MirLua/src/script_loader.cpp +++ b/plugins/MirLua/src/script_loader.cpp @@ -11,18 +11,18 @@ CMLuaScriptLoader::CMLuaScriptLoader(lua_State *L) void CMLuaScriptLoader::SetPaths()
{
wchar_t path[MAX_PATH];
+ ptrA pathA(nullptr);
lua_getglobal(L, LUA_LOADLIBNAME);
FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
- lua_pushfstring(L, "%s\\?.%s", T2Utf(path), _T2A(LUACLIBSCRIPTEXT));
+ pathA = mir_utf8encodeW(path);
+ lua_pushfstring(L, "%s\\?.%s", pathA, _T2A(LUACLIBSCRIPTEXT));
lua_setfield(L, -2, "cpath");
FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
- lua_pushfstring(L, "%s\\?.%s", T2Utf(path), _T2A(LUATEXTSCRIPTEXT));
- lua_setfield(L, -2, "path");
-
- lua_pushfstring(L, "%s\\?.%s", T2Utf(path), _T2A(LUAPRECSCRIPTEXT));
+ pathA = mir_utf8encodeW(path);
+ lua_pushfstring(L, "%s\\?.%s;%s\\?.%s", pathA, _T2A(LUATEXTSCRIPTEXT), pathA, _T2A(LUAPRECSCRIPTEXT));
lua_setfield(L, -2, "path");
lua_pop(L, 1);
|