diff options
author | Brad King <brad.king@kitware.com> | 2023-11-22 14:09:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-22 14:53:26 (GMT) |
commit | 5c77facd7826f285fbf4d553160d1a542d60942b (patch) | |
tree | f78a06ef7d5d999a7d5cd7dddc04703440156e00 /Source | |
parent | e68e7b176808c6c8b226c15a80d6632fc2b73751 (diff) | |
download | CMake-5c77facd7826f285fbf4d553160d1a542d60942b.zip CMake-5c77facd7826f285fbf4d553160d1a542d60942b.tar.gz CMake-5c77facd7826f285fbf4d553160d1a542d60942b.tar.bz2 |
VS: Fix Intel plugin version detection fallback
Do not read a value that was not parsed.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 1abdd0b..9739a09 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -94,8 +94,8 @@ const std::string& cmGlobalVisualStudio7Generator::GetIntelProjectVersion() cmSystemTools::ReadRegistryValue(vskey, intelVersion, cmSystemTools::KeyWOW64_32); unsigned int intelVersionNumber = ~0u; - sscanf(intelVersion.c_str(), "%u", &intelVersionNumber); - if (intelVersionNumber >= 11) { + if (sscanf(intelVersion.c_str(), "%u", &intelVersionNumber) != 1 || + intelVersionNumber >= 11) { // Default to latest known project file version. intelVersion = "11.0"; } else if (intelVersionNumber == 10) { |