From 9593f56eeebee2dafe4e09c9026ae370eb3b5df2 Mon Sep 17 00:00:00 2001 From: Thinkofname Date: Mon, 28 Mar 2016 22:10:33 +0100 Subject: [PATCH] Only trim_left the hash string --- protocol/src/protocol/mojang.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/protocol/mojang.rs b/protocol/src/protocol/mojang.rs index d4f53a8..45997f5 100644 --- a/protocol/src/protocol/mojang.rs +++ b/protocol/src/protocol/mojang.rs @@ -114,7 +114,7 @@ impl Profile { twos_compliment(&mut hash); } let hash_str = hash.iter().map(|b| format!("{:02x}", b)).collect::>().join(""); - let hash_val = hash_str.trim_matches('0'); + let hash_val = hash_str.trim_left_matches('0'); let hash_str = if negative { "-".to_owned() + &hash_val[..] } else {