diff options
author | David Cole <david.cole@kitware.com> | 2009-04-07 19:13:07 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-04-07 19:13:07 (GMT) |
commit | f6828c391deb8274de43270fec640d02b15778fd (patch) | |
tree | 11b6537b68d3c0b9a5675e946c8124aaf067901e /Source/cmLocalGenerator.cxx | |
parent | 36e9a6ed8142950a1e0647c76bb436263c19e82d (diff) | |
download | CMake-f6828c391deb8274de43270fec640d02b15778fd.zip CMake-f6828c391deb8274de43270fec640d02b15778fd.tar.gz CMake-f6828c391deb8274de43270fec640d02b15778fd.tar.bz2 |
BUG: Fix invalid array access discovered during investigation of issue #7832.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c1c80a0..c38bedd 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1232,7 +1232,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang) } std::string flags = includeFlags.str(); // remove trailing separators - if((sep[0] != ' ') && flags[flags.size()-1] == sep[0]) + if((sep[0] != ' ') && flags.size()>0 && flags[flags.size()-1] == sep[0]) { flags[flags.size()-1] = ' '; } |