From 7078132342222f7c01057ea4fe20b627aec4f2e4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 9 Feb 2006 06:55:02 +0000 Subject: [PATCH] fixed double-load bug --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40181 --- sourcemm/CPlugin.cpp | 2 +- sourcemm/concommands.cpp | 4 ++-- sourcemm/version.rc | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sourcemm/CPlugin.cpp b/sourcemm/CPlugin.cpp index 72fc737..3fdecf2 100644 --- a/sourcemm/CPlugin.cpp +++ b/sourcemm/CPlugin.cpp @@ -63,7 +63,7 @@ PluginId CPluginManager::Load(const char *file, PluginId source, bool &already, PluginIter i = m_Plugins.begin(); while (i != m_Plugins.end()) { - if ( (*i) && (*i)->m_File.compare(file)==0 ) + if ( (*i) && UTIL_PathCmp(file, (*i)->m_File.c_str()) ) { if ( (*i)->m_Status < Pl_Paused ) { diff --git a/sourcemm/concommands.cpp b/sourcemm/concommands.cpp index cb84f1f..ae8901d 100644 --- a/sourcemm/concommands.cpp +++ b/sourcemm/concommands.cpp @@ -376,16 +376,16 @@ CON_COMMAND(meta, "Metamod:Source Menu") if (file[0] == '/' || strcmp(&(file[1]), ":\\") == 0) { + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s", file); snprintf(full_path, sizeof(full_path)-1, "%s", file); } else { const char *ext = UTIL_GetExtension(file); #if defined WIN32 || defined _WIN32 ext = ext ? "" : ".dll"; - snprintf(full_path, sizeof(full_path)-1, "%s\\%s%s", g_ModPath.c_str(), file, ext); #else ext = ext ? "" : "_i486.so"; - snprintf(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), file, ext); #endif + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), file, ext); } char error[255]={0}; diff --git a/sourcemm/version.rc b/sourcemm/version.rc index a284554..6dd6718 100755 --- a/sourcemm/version.rc +++ b/sourcemm/version.rc @@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,0,0 - PRODUCTVERSION 1,2,0,0 + FILEVERSION 1,2,1,0 + PRODUCTVERSION 1,2,1,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,12 +45,12 @@ BEGIN BEGIN VALUE "Comments", "Metamod: Source" VALUE "FileDescription", "Metamod: Source" - VALUE "FileVersion", "1.2" + VALUE "FileVersion", "1.2.1" VALUE "InternalName", "sourcemm" VALUE "LegalCopyright", "Copyright (c) 2004-2006, Metamod: Source Development Team" VALUE "OriginalFilename", "server.dll" VALUE "ProductName", "Metamod: Source" - VALUE "ProductVersion", "1.2" + VALUE "ProductVersion", "1.2.1" END END BLOCK "VarFileInfo"