- for (size_t i = 0; the_environ[i]; ++i) {
-
- string estring = the_environ[i];
- string::size_type equal = estring.find_first_of ('=');
+ vector<string> ecopy;
+
+ for (size_t i = 0; environ[i]; ++i) {
+ ecopy.push_back (environ[i]);
+ }
+
+ for (vector<string>::const_iterator e = ecopy.begin(); e != ecopy.end(); ++e) {
+ string::size_type equal = (*e).find_first_of ('=');