Skip to content

Commit

Permalink
conf: fix std::env::set_var with NUL byte
Browse files Browse the repository at this point in the history
  • Loading branch information
chinsyo authored and eycorsican committed Oct 5, 2024
1 parent e8a7eb9 commit b9fa3dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leaf/src/config/conf/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ where
pub fn from_lines(lines: Vec<io::Result<String>>) -> Result<Config> {
let env_lines = get_lines_by_section("Env", lines.iter());
for line in env_lines {
let parts: Vec<&str> = line.split('=').map(str::trim).collect();
let parts: Vec<&str> = line.split('=').map(|s| s.trim_matches('\u{0}')).map(str::trim).collect();
if parts.len() != 2 {
continue;
}
Expand Down

0 comments on commit b9fa3dd

Please sign in to comment.