Skip to content

Commit f1f1cbf

Browse files
Remove nul chars from string before parsing to numerical values
1 parent e69c2aa commit f1f1cbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl NativeClientConfig {
150150
}
151151

152152
// Convert the C string to a Rust string.
153-
Ok(String::from_utf8_lossy(&buf).to_string())
153+
Ok(String::from_utf8_lossy(&buf).trim_matches(char::from(0)).to_string())
154154
}
155155
}
156156

0 commit comments

Comments
 (0)