Skip to content

Commit

Permalink
fix plugin lookup before PostLoad, resolves #10
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpatt committed Jan 6, 2022
1 parent a6f189c commit 4eb7d92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions skse64/PluginAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ struct SKSEPluginVersionData

char author[256]; // null-terminated ASCII plugin author name (can be empty)
char supportEmail[256]; // null-terminated ASCII support email address (can be empty)
// this is not for showing to users, it's in case I need to contact you about
// a compatibility problem with your plugin

// version compatibility
UInt32 versionIndependence; // set to one of the kVersionIndependent_ enums or zero
Expand Down
4 changes: 2 additions & 2 deletions skse64/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ bool PluginManager::Dispatch_Message(PluginHandle sender, UInt32 messageType, vo
const char * PluginManager::GetPluginNameFromHandle(PluginHandle handle)
{
if (handle > 0 && handle <= m_plugins.size())
return (m_plugins[handle - 1].info.name);
return (m_plugins[handle - 1].version.name);
else if (handle == 0)
return "SKSE";

Expand All @@ -849,7 +849,7 @@ PluginHandle PluginManager::LookupHandleFromName(const char* pluginName)
for(LoadedPluginList::iterator iter = m_plugins.begin(); iter != m_plugins.end(); ++iter)
{
LoadedPlugin * plugin = &(*iter);
if(!_stricmp(plugin->info.name, pluginName))
if(!_stricmp(plugin->version.name, pluginName))
{
return idx;
}
Expand Down

0 comments on commit 4eb7d92

Please sign in to comment.