mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Fixed unsigned fields being read as signed
This commit is contained in:
parent
f2fa13119a
commit
c16f45ce39
@ -68,8 +68,8 @@ abstract class DataPacket extends \stdClass{
|
||||
$this->buffer .= $str;
|
||||
}
|
||||
|
||||
protected function getLong($unsigned = false){
|
||||
return Binary::readLong($this->get(8), $unsigned);
|
||||
protected function getLong($signed = true){
|
||||
return Binary::readLong($this->get(8), $signed);
|
||||
}
|
||||
|
||||
protected function putLong($v){
|
||||
@ -84,8 +84,8 @@ abstract class DataPacket extends \stdClass{
|
||||
$this->buffer .= Binary::writeInt($v);
|
||||
}
|
||||
|
||||
protected function getShort($unsigned = false){
|
||||
return Binary::readShort($this->get(2), $unsigned);
|
||||
protected function getShort($signed = true){
|
||||
return Binary::readShort($this->get(2), $signed);
|
||||
}
|
||||
|
||||
protected function putShort($v){
|
||||
@ -159,7 +159,7 @@ abstract class DataPacket extends \stdClass{
|
||||
}
|
||||
|
||||
protected function getString(){
|
||||
return $this->get($this->getShort(true));
|
||||
return $this->get($this->getShort(false));
|
||||
}
|
||||
|
||||
protected function putString($v){
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9b0c3a587251d47cf63dbe0f9432126177b417a5
|
||||
Subproject commit 577c371aa07bd2aa3cedc3b7d4bcdc1d54999c70
|
Loading…
x
Reference in New Issue
Block a user