From b7ac7452f7d8b67fad428337f267a68e6e9528e0 Mon Sep 17 00:00:00 2001 From: Fyren Date: Mon, 23 Nov 2009 01:47:32 -0800 Subject: [PATCH] Fix wonky handling of path separators for "sm plugins" commands (bug 3857, r=dvander) --- core/PluginSys.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/PluginSys.cpp b/core/PluginSys.cpp index f8a90955..9337267a 100644 --- a/core/PluginSys.cpp +++ b/core/PluginSys.cpp @@ -2052,7 +2052,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c char pluginfile[256]; const char *ext = g_LibSys.GetFileExtension(filename) ? "" : ".smx"; - UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", filename, ext); + g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", filename, ext); IPlugin *pl = LoadPlugin(pluginfile, false, PluginType_MapUpdated, error, sizeof(error), &wasloaded); @@ -2099,7 +2099,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c { char pluginfile[256]; const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx"; - UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext); + g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext); if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl)) { @@ -2189,7 +2189,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c { char pluginfile[256]; const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx"; - UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext); + g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext); if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl)) { @@ -2310,7 +2310,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c { char pluginfile[256]; const char *ext = g_LibSys.GetFileExtension(arg) ? "" : ".smx"; - UTIL_Format(pluginfile, sizeof(pluginfile), "%s%s", arg, ext); + g_SourceMod.BuildPath(Path_None, pluginfile, sizeof(pluginfile), "%s%s", arg, ext); if (!sm_trie_retrieve(m_LoadLookup, pluginfile, (void **)&pl)) {