diff options
Diffstat (limited to 'src/modmanager_dynamic.cpp')
-rw-r--r-- | src/modmanager_dynamic.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index a153accbb..b58697679 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -37,10 +37,9 @@ bool ModuleManager::Load(const std::string& filename, bool defer) if (filename.find('/') != std::string::npos) return false; - char modfile[MAXBUF]; - snprintf(modfile,MAXBUF,"%s/%s",ServerInstance->Config->ModPath.c_str(),filename.c_str()); + const std::string moduleFile = ServerInstance->Config->ModPath + "/" + filename; - if (!ServerConfig::FileExists(modfile)) + if (!ServerConfig::FileExists(moduleFile.c_str())) { LastModuleError = "Module file could not be found: " + filename; ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError); @@ -55,7 +54,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer) } Module* newmod = NULL; - DLLManager* newhandle = new DLLManager(modfile); + DLLManager* newhandle = new DLLManager(moduleFile.c_str()); try { |