Skip to content

Commit

Permalink
fix(util/channel_layout): strip trailing nul in describe results on…
Browse files Browse the repository at this point in the history
… 6.1

Co-authored-by: tilpner <git@tilpner.com>
  • Loading branch information
jakobssen and tilpner committed Feb 27, 2024
1 parent db79928 commit 7c354aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/channel_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl ChannelLayout {

if bytes_needed <= buf.len() {
let s = String::from_utf8_lossy(&buf[..bytes_needed]);
Ok(Ok(s.into_owned()))
Ok(Ok(s.trim_end_matches('\0').to_owned()))
}
else {
Ok(Err(bytes_needed))
Expand Down

0 comments on commit 7c354aa

Please sign in to comment.