diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-19 03:24:00 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-19 03:24:00 (GMT) |
commit | ed981ef0b7f6988e205ad540bc82581b9f0a7f0b (patch) | |
tree | aee8f51261c13ec153ba8103a2f6a46d6bad2732 /Source/cmakemain.cxx | |
parent | 6580114309dd2a0e547ddf9b8cb4148fe6cc857f (diff) | |
download | CMake-ed981ef0b7f6988e205ad540bc82581b9f0a7f0b.zip CMake-ed981ef0b7f6988e205ad540bc82581b9f0a7f0b.tar.gz CMake-ed981ef0b7f6988e205ad540bc82581b9f0a7f0b.tar.bz2 |
ENH: fix crashes when command line arguments are not followed by the correct number of arguments
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index bb01116..3da5a06 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -236,10 +236,13 @@ int do_cmake(int ac, char** av) { cmSystemTools::Error("No script specified for argument -P"); } - script_mode = true; - args.push_back(av[i]); - i++; - args.push_back(av[i]); + else + { + script_mode = true; + args.push_back(av[i]); + i++; + args.push_back(av[i]); + } } else { |