core/systems/PluginInfoDatabase.cpp
changeset 205 b766f3af24bd
parent 203 c7f86f9e6f60
child 211 4c77142eaf36
     1.1 --- a/core/systems/PluginInfoDatabase.cpp	Wed Dec 13 11:09:43 2006 +0000
     1.2 +++ b/core/systems/PluginInfoDatabase.cpp	Wed Dec 13 11:10:02 2006 +0000
     1.3 @@ -69,14 +69,16 @@
     1.4  PluginSettings *CPluginInfoDatabase::GetSettingsIfMatch(unsigned int index, const char *filename)
     1.5  {
     1.6  	BaseMemTable *memtab = m_strtab->GetMemTable();
     1.7 -	PluginSettings *table = (PluginSettings *)memtab->GetAddress(m_infodb);
     1.8 +	int *table = (int *)memtab->GetAddress(m_infodb);
     1.9  
    1.10  	if (!table || index >= m_infodb_count)
    1.11  	{
    1.12  		return NULL;
    1.13  	}
    1.14  
    1.15 -	const char *name = m_strtab->GetString(table[index].name);
    1.16 +	PluginSettings *plugin = (PluginSettings *)memtab->GetAddress(table[index]);
    1.17 +
    1.18 +	const char *name = m_strtab->GetString(plugin->name);
    1.19  
    1.20  	if (!name)
    1.21  	{
    1.22 @@ -88,7 +90,7 @@
    1.23  		return NULL;
    1.24  	}
    1.25  
    1.26 -	return &table[index];
    1.27 +	return plugin;
    1.28  }
    1.29  
    1.30  void CPluginInfoDatabase::GetOptionsForPlugin(PluginSettings *settings, unsigned int opt_num, const char **key, const char **val)
    1.31 @@ -189,7 +191,7 @@
    1.32  {
    1.33  	if (in_plugins)
    1.34  	{
    1.35 -		if (cur_plugin == -1)
    1.36 +		if (cur_plugin != -1)
    1.37  		{
    1.38  			if (in_options)
    1.39  			{