mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-26 14:00:22 +00:00
fixed another crash
This commit is contained in:
1 parent
13207a8ddf
commit
e15833084a
1 file changed
+4
@@ -350,6 +350,10 @@ impl Server {
|
|||||||
if packet.data.len() == 0 {
|
if packet.data.len() == 0 {
|
||||||
return Ok(()); // what!
|
return Ok(()); // what!
|
||||||
}
|
}
|
||||||
|
if packet.data[0] < 1 {
|
||||||
|
// return Err(ServerError::BrokenPacket.into());
|
||||||
|
return Ok(()); // Ignore for now?
|
||||||
|
}
|
||||||
let id = packet.data[0] - 1; // Offset by 1
|
let id = packet.data[0] - 1; // Offset by 1
|
||||||
let data = packet.data[2..].to_vec();
|
let data = packet.data[2..].to_vec();
|
||||||
let packet_processed = RawPacket {
|
let packet_processed = RawPacket {
|
||||||
|
|||||||
Reference in new issue
Block a user