diff options
| author | 2013-05-15 12:33:47 -0700 | |
|---|---|---|
| committer | 2013-05-15 12:33:47 -0700 | |
| commit | e586aaab7c4f7b03514c83451d73b73f55dc6998 (patch) | |
| tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/modmanager_dynamic.cpp | |
| parent | Merge pull request #523 from SaberUK/master+server-notice (diff) | |
| parent | Replace some C-isms with C++-isms. (diff) | |
Merge pull request #531 from SaberUK/master+snprintf-removal
Replace some C-isms with C++-isms.
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 { |
