diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-22 21:13:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-22 21:13:06 +0000 |
commit | d83d6212f93d792d0d024de1c20a75ff3e839955 (patch) | |
tree | 70371c5110f5d1757e8fa6ed3db01afd2a373905 /sal/qa/osl/process/osl_process_child.cxx | |
parent | 933acd0e9aa0565b23e615c314a8044148c32d5e (diff) |
Account for the possibilty of a newline in an env variable
So, lets getline on '\0' and keep it simple.
Diffstat (limited to 'sal/qa/osl/process/osl_process_child.cxx')
-rw-r--r-- | sal/qa/osl/process/osl_process_child.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx index 124fcd14b..0417874cf 100644 --- a/sal/qa/osl/process/osl_process_child.cxx +++ b/sal/qa/osl/process/osl_process_child.cxx @@ -89,7 +89,7 @@ void w_to_a(LPCTSTR _strW, LPSTR strA, DWORD size) while (size_t l = _tcslen(reinterpret_cast<wchar_t*>(p))) { w_to_a(p, buffer, sizeof(buffer)); - file << buffer << std::endl; + file << buffer << '\0'; p += l + 1; } FreeEnvironmentStrings(env); @@ -100,8 +100,8 @@ void w_to_a(LPCTSTR _strW, LPSTR strA, DWORD size) void dump_env(char* file_path) { std::ofstream file(file_path); - for (int i = 0; NULL != environ[i]; i++) - file << environ[i] << std::endl; + for (int i = 0; NULL != environ[i]; ++i) + file << environ[i] << '\0'; } #endif |