aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 71e893866..021da42bc 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -612,12 +612,13 @@ ServiceProvider* ModuleManager::FindService(ServiceType type, const std::string&
std::string ModuleManager::ExpandModName(const std::string& modname)
{
+ const static size_t extlen = strlen(DLL_EXTENSION);
std::string fullname;
if (modname.compare(0, 5, "core_") != 0 && modname.compare(0, 2, "m_") != 0)
fullname.append("m_");
fullname.append(modname);
- if (modname.length() < 3 || modname.compare(modname.size() - 3, 3, ".so") != 0)
- fullname.append(".so");
+ if (modname.length() < extlen || modname.compare(modname.size() - extlen, extlen, DLL_EXTENSION) != 0)
+ fullname.append(DLL_EXTENSION);
return fullname;
}