From fb2a967575725f92744d7b6ca3431fc2a4b5b1c7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 24 Mar 2022 01:49:26 +0000 Subject: Fix allowing modules to have a path on Windows. --- src/modulemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modulemanager.cpp') diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index cac126358..c8ce6b57e 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -30,7 +30,7 @@ bool ModuleManager::Load(const std::string& modname, bool defer) { /* Don't allow people to specify paths for modules, it doesn't work as expected */ - if (modname.find('/') != std::string::npos) + if (modname.find_first_of("\\/") != std::string::npos) { LastModuleError = "You can't load modules with a path: " + modname; return false; -- cgit v1.3.1-10-gc9f91