From adb5b542af9eec23ae62084fac8ca3b6e09eb93a Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 3 May 2017 14:50:20 +0100 Subject: [PATCH] Fixed a memory access bug with the previous commit --- .../Project Saving/jucer_ProjectExport_MSVC.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 2406f59f58..8b19f22bfa 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -1883,7 +1883,7 @@ public: addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets)); addIPPLibraryProperty (props); - static const char* cppStandardNames[] = { "(default)", "C++14", "Latest C++ Standard" }; + static const char* cppStandardNames[] = { "(default)", "C++14", "Latest C++ Standard", nullptr }; Array cppStandardValues; cppStandardValues.add (var()); @@ -1894,16 +1894,11 @@ public: StringArray (cppStandardNames), cppStandardValues), "The C++ language standard to use"); - static const char* targetPlatformNames[] = { "(default)", "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; - - Array targetPlatforms; - targetPlatforms.add (var()); - - for (int i = 1; i < numElementsInArray (targetPlatformNames); ++i) - targetPlatforms.add (var (targetPlatformNames[i])); + static const char* targetPlatformNames[] = { "(default)", "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0", nullptr }; + const var targetPlatforms[] = { var(), "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; props.add (new ChoicePropertyComponent (getWindowsTargetPlatformVersionValue(), "VS2017 Windows Target Platform", - StringArray (targetPlatformNames), targetPlatforms), + StringArray (targetPlatformNames), Array (targetPlatforms, numElementsInArray (targetPlatforms))), "The Windows target platform to use"); }