diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-08 14:59:24 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-01-08 14:59:24 (GMT) |
commit | c336a9b1ac995fdc6f12815416425c2c44d4f2e8 (patch) | |
tree | 4f9a076d34b562cf8b39c3584529e2b0a8baa65c /Source/cmGlobalGenerator.cxx | |
parent | 4f4984ff7fb4fb2800937edf577844cda86d3a6a (diff) | |
download | CMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.zip CMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.tar.gz CMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.tar.bz2 |
BUG: make sure null terminator is in the right place for putenv static char array
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ec0de18..a0ca704 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -150,7 +150,7 @@ void cmGlobalGenerator::EnableLanguage(const char* lang, } strncpy(envCC, env.c_str(), size); envCC[size] = 0; - putenv(envCC); + putenv(envCC); } } @@ -178,7 +178,7 @@ void cmGlobalGenerator::EnableLanguage(const char* lang, size = 4999; } strncpy(envCXX, env.c_str(), size); - envCXX[4999] = 0; + envCXX[size] = 0; putenv(envCXX); } } |