mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
NetworkBinaryStream: bail on unknown entity data types
This commit is contained in:
@@ -160,7 +160,7 @@ class NetworkBinaryStream extends BinaryStream{
|
|||||||
$value = $this->getVector3();
|
$value = $this->getVector3();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$value = [];
|
throw new \UnexpectedValueException("Invalid data type " . $type);
|
||||||
}
|
}
|
||||||
if($types){
|
if($types){
|
||||||
$data[$key] = [$type, $value];
|
$data[$key] = [$type, $value];
|
||||||
@@ -214,6 +214,9 @@ class NetworkBinaryStream extends BinaryStream{
|
|||||||
break;
|
break;
|
||||||
case Entity::DATA_TYPE_VECTOR3F:
|
case Entity::DATA_TYPE_VECTOR3F:
|
||||||
$this->putVector3Nullable($d[1]);
|
$this->putVector3Nullable($d[1]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new \UnexpectedValueException("Invalid data type " . $d[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user