Do not copy environment strings, just refer to them
This commit is contained in:
parent
31d67f51dd
commit
ef0c183ed7
|
@ -16,7 +16,8 @@ EnvVarMap get_env_vars()
|
|||
const char* value = name;
|
||||
while (*value != 0 and *value != '=')
|
||||
++value;
|
||||
env_vars.insert({{name, value}, (*value == '=') ? value+1 : String{}});
|
||||
env_vars.insert({String{String::NoCopy{}, {name, value}},
|
||||
(*value == '=') ? String{String::NoCopy{}, value+1} : String{}});
|
||||
}
|
||||
return env_vars;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user