From 21c9ac4f5390d5e82876fed6124f2bbf42b7f5ca Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Fri, 13 Nov 2020 22:52:26 +0100 Subject: [PATCH] fixed missing backslash --- src/Lua/LuaSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lua/LuaSystem.cpp b/src/Lua/LuaSystem.cpp index f43068a..987217d 100644 --- a/src/Lua/LuaSystem.cpp +++ b/src/Lua/LuaSystem.cpp @@ -49,7 +49,7 @@ void SendError(lua_State* L, const std::string& msg) { a = Sec("_Console"); } else { Lua& S = MaybeS.value(); - a = S.GetFileName().substr(S.GetFileName().find('\\')); + a = "\\" + fs::path(S.GetFileName()).filename().string(); } warn(a + Sec(" | Incorrect Call of ") + msg); } @@ -107,7 +107,7 @@ bool CheckLua(lua_State* L, int r) { auto MaybeS = GetScript(L); if (MaybeS.has_value()) { Lua& S = MaybeS.value(); - std::string a = fs::path(S.GetFileName()).filename().string(); + std::string a = "\\" + fs::path(S.GetFileName()).filename().string(); warn(a + " | " + msg); return false; } @@ -160,7 +160,7 @@ int lua_TriggerEventG(lua_State* L) { } char* ThreadOrigin(Lua* lua) { - std::string T = "Thread in " + fs::path(lua->GetFileName()).filename().string(); + std::string T = "Thread in \\" + fs::path(lua->GetFileName()).filename().string(); char* Data = new char[T.size() + 1]; ZeroMemory(Data, T.size() + 1); memcpy(Data, T.c_str(), T.size());