mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +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;
|
$this->buffer .= $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getLong($unsigned = false){
|
protected function getLong($signed = true){
|
||||||
return Binary::readLong($this->get(8), $unsigned);
|
return Binary::readLong($this->get(8), $signed);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function putLong($v){
|
protected function putLong($v){
|
||||||
@ -84,8 +84,8 @@ abstract class DataPacket extends \stdClass{
|
|||||||
$this->buffer .= Binary::writeInt($v);
|
$this->buffer .= Binary::writeInt($v);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getShort($unsigned = false){
|
protected function getShort($signed = true){
|
||||||
return Binary::readShort($this->get(2), $unsigned);
|
return Binary::readShort($this->get(2), $signed);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function putShort($v){
|
protected function putShort($v){
|
||||||
@ -159,7 +159,7 @@ abstract class DataPacket extends \stdClass{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function getString(){
|
protected function getString(){
|
||||||
return $this->get($this->getShort(true));
|
return $this->get($this->getShort(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function putString($v){
|
protected function putString($v){
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 9b0c3a587251d47cf63dbe0f9432126177b417a5
|
Subproject commit 577c371aa07bd2aa3cedc3b7d4bcdc1d54999c70
|
Loading…
x
Reference in New Issue
Block a user