From dc2b49aece6394fefb254cf686ca6340ea579ca8 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 24 Sep 2005 11:38:13 +0000 Subject: [PATCH] don't use NormalizedCommand in IsPluginCommand, it asserts on non-existing plug-in commands git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4287 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/Plugins.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp index 47e8a3a0..a050a469 100644 --- a/Source/Plugins.cpp +++ b/Source/Plugins.cpp @@ -92,8 +92,9 @@ void Plugins::GetExports(const string &pathToDll, bool displayInfo) { const string name = string((char*)exports + names[j] - ExportDirVA); const string signature = dllName + "::" + name; - m_command_to_path[signature] = pathToDll; - m_command_lowercase_to_command[lowercase(signature)] = signature; + const string lcsig = lowercase(signature); + m_command_to_path[lcsig] = pathToDll; + m_command_lowercase_to_command[lcsig] = signature; if (displayInfo) fprintf(g_output, " - %s\n", signature.c_str()); } @@ -107,7 +108,7 @@ void Plugins::GetExports(const string &pathToDll, bool displayInfo) } bool Plugins::IsPluginCommand(const string& token) const { - return m_command_to_path.find(NormalizedCommand(token)) != m_command_to_path.end(); + return m_command_to_path.find(lowercase(token)) != m_command_to_path.end(); } namespace { @@ -144,7 +145,7 @@ int Plugins::GetPluginHandle(bool uninst, const string& command) const { } string Plugins::GetPluginPath(const string& command) const { - return get_value(m_command_to_path, command); + return get_value(m_command_to_path, lowercase(command)); } void Plugins::SetDllDataHandle(bool uninst, const string& command, int dataHandle)