rust/hedgewars-server/src/utils.rs
changeset 14786 01f8ab45f806
parent 14784 f43ab2bd76ae
child 14788 b3adc030104b
--- a/rust/hedgewars-server/src/utils.rs	Tue Apr 09 23:03:12 2019 +0300
+++ b/rust/hedgewars-server/src/utils.rs	Wed Apr 10 01:13:29 2019 +0300
@@ -9,6 +9,7 @@
 pub fn is_name_illegal(name: &str) -> bool {
     name.len() > 40
         || name.trim().is_empty()
+        || name.trim() != name
         || name
             .chars()
             .any(|c| "$()*+?[]^{|}\x7F".contains(c) || '\x00' <= c && c <= '\x1F')