From 9a740f1b595c7e68aa4670745097d2ca907513b9 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 21 Apr 2017 20:54:50 +0200 Subject: [PATCH] cmCPackIFWInstaller: fix validation of WizardStyle option --- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 664048dad2..5e5f0669ca 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -171,16 +171,17 @@ void cmCPackIFWInstaller::ConfigureFromOptions() // WizardStyle if (const char* option = GetOption("CPACK_IFW_PACKAGE_WIZARD_STYLE")) { - if (WizardStyle == "Modern" && WizardStyle == "Aero" && - WizardStyle == "Mac" && WizardStyle == "Classic") { + // Setting the user value in any case + WizardStyle = option; + // Check known values + if (WizardStyle != "Modern" && WizardStyle != "Aero" && + WizardStyle != "Mac" && WizardStyle != "Classic") { cmCPackLogger( cmCPackLog::LOG_WARNING, "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \"" << option << "\". Expected values are: Modern, Aero, Mac, Classic." << std::endl); } - - WizardStyle = option; } // WizardDefaultWidth