From c333ba84bee44549bb15675f353e04d22fb9f53c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Feb 2023 03:08:43 +0000 Subject: commit for merge --- NorthstarDLL/squirrel/squirrel.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'NorthstarDLL/squirrel/squirrel.h') diff --git a/NorthstarDLL/squirrel/squirrel.h b/NorthstarDLL/squirrel/squirrel.h index ce758d7c..65bda7e3 100644 --- a/NorthstarDLL/squirrel/squirrel.h +++ b/NorthstarDLL/squirrel/squirrel.h @@ -239,17 +239,15 @@ class SquirrelManagerBase { SQStackInfos stackInfo {}; if (1 + depth >= sqvm->_callstacksize) - { return nullptr; - } + sq_stackinfos(sqvm, 1 + depth, stackInfo); std::string sourceName = stackInfo._sourceName; std::replace(sourceName.begin(), sourceName.end(), '/', '\\'); std::string filename = "scripts\\vscripts\\" + sourceName; - if (auto res = g_pModManager->m_ModFiles.find(filename); res != g_pModManager->m_ModFiles.end()) - { + if (auto res = g_pModManager->GetModFiles().find(filename); res != g_pModManager->GetModFiles().end()) return res->second.m_pOwningMod; - } + return nullptr; } template inline SQRESULT getuserdata(HSquirrelVM* sqvm, const SQInteger stackpos, T* data, uint64_t* typeId) -- cgit v1.2.3