aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel/squirrel.h
diff options
context:
space:
mode:
authorunknown <for.oliver.kirkham@gmail.com>2023-02-11 03:08:43 +0000
committerunknown <for.oliver.kirkham@gmail.com>2023-02-11 03:08:43 +0000
commitc333ba84bee44549bb15675f353e04d22fb9f53c (patch)
treef62b52a47556e531ac43fad99149b743b96537a0 /NorthstarDLL/squirrel/squirrel.h
parenta4e798b2778a8606f56cc78ce11a5889cf5a8b5a (diff)
downloadNorthstarLauncher-c333ba84bee44549bb15675f353e04d22fb9f53c.tar.gz
NorthstarLauncher-c333ba84bee44549bb15675f353e04d22fb9f53c.zip
commit for merge
Diffstat (limited to 'NorthstarDLL/squirrel/squirrel.h')
-rw-r--r--NorthstarDLL/squirrel/squirrel.h8
1 files changed, 3 insertions, 5 deletions
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 <typename T> inline SQRESULT getuserdata(HSquirrelVM* sqvm, const SQInteger stackpos, T* data, uint64_t* typeId)