From 157e993eb6ff6ed84d79b3f0ad6aa021ef4f9735 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 27 Feb 2019 11:41:11 -0500 Subject: [PATCH] Trim the end of the target type string To be on the safe side. Also, it looks tidier because it matches the code block following. Signed-off-by: mulhern --- src/core/dm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dm.rs b/src/core/dm.rs index 9dafefe2..0674b607 100644 --- a/src/core/dm.rs +++ b/src/core/dm.rs @@ -570,7 +570,7 @@ impl DM { let target_type = unsafe { let cast: &[u8; 16] = &*(&targ.target_type as *const [u8; 16]); let slc = slice_to_null(cast).expect("assume all parsing succeeds"); - String::from_utf8_lossy(slc).into_owned() + String::from_utf8_lossy(slc).trim_end().to_owned() }; let params = {