From f1f1cbf54fc10aa5823b97577eea067c81b63860 Mon Sep 17 00:00:00 2001 From: KowalczykBartek Date: Wed, 29 May 2024 19:26:40 +0200 Subject: [PATCH] Remove nul chars from string before parsing to numerical values --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 296d9f867..58e062a5b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -150,7 +150,7 @@ impl NativeClientConfig { } // Convert the C string to a Rust string. - Ok(String::from_utf8_lossy(&buf).to_string()) + Ok(String::from_utf8_lossy(&buf).trim_matches(char::from(0)).to_string()) } }