core/systems/ExtensionSys.cpp
changeset 1508 398538bce59b
parent 1456 69a68787c743
child 1541 e46ad208b9b4
     1.1 --- a/core/systems/ExtensionSys.cpp	Mon Oct 01 14:31:57 2007 +0000
     1.2 +++ b/core/systems/ExtensionSys.cpp	Mon Oct 01 18:04:37 2007 +0000
     1.3 @@ -124,11 +124,13 @@
     1.4  
     1.5  CExtension::~CExtension()
     1.6  {
     1.7 +	char temp_buffer[255];
     1.8 +
     1.9  	if (m_pAPI)
    1.10  	{
    1.11  		if (m_PlId)
    1.12  		{
    1.13 -			g_pMMPlugins->Unload(m_PlId, true, NULL, 0);
    1.14 +			g_pMMPlugins->Unload(m_PlId, true, temp_buffer, sizeof(temp_buffer));
    1.15  		}
    1.16  	}
    1.17  
    1.18 @@ -435,14 +437,16 @@
    1.19  		return FindExtensionByFile(path);
    1.20  	}
    1.21  
    1.22 -	/* Make sure the file direction is right */
    1.23 -	char path[PLATFORM_MAX_PATH];
    1.24 -	g_LibSys.PathFormat(path, sizeof(path), "%s", file);
    1.25 +	/* Chomp off the path */
    1.26 +	char lookup[PLATFORM_MAX_PATH];
    1.27 +	g_LibSys.GetFileFromPath(lookup, sizeof(lookup), file);
    1.28  
    1.29  	for (iter=m_Libs.begin(); iter!=m_Libs.end(); iter++)
    1.30  	{
    1.31  		pExt = (*iter);
    1.32 -		if (strcmp(pExt->GetFilename(), path) == 0)
    1.33 +		char short_file[PLATFORM_MAX_PATH];
    1.34 +		g_LibSys.GetFileFromPath(short_file, sizeof(short_file), pExt->GetFilename());
    1.35 +		if (strcmp(lookup, short_file) == 0)
    1.36  		{
    1.37  			return pExt;
    1.38  		}