rust/hedgewars-server/src/handlers/inroom.rs
changeset 15326 136023417164
parent 15111 1e45db229f9f
child 15439 a158ff8f84ef
--- a/rust/hedgewars-server/src/handlers/inroom.rs	Thu Aug 15 21:15:32 2019 +0200
+++ b/rust/hedgewars-server/src/handlers/inroom.rs	Thu Aug 15 16:07:57 2019 -0400
@@ -49,7 +49,7 @@
 #[cfg(canhazslicepatterns)]
 fn is_msg_valid(msg: &[u8], team_indices: &[u8]) -> bool {
     match msg {
-        [size, typ, body..] => {
+        [size, typ, body..MAX] => {
             VALID_MESSAGES.contains(typ)
                 && match body {
                     [1...MAX_HEDGEHOGS_PER_TEAM, team, ..] if *typ == b'h' => {