mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Update RakNetDataPacket.php
This commit is contained in:
parent
8e3c16a035
commit
3faffd84ad
1 changed files with 7 additions and 5 deletions
|
|
@ -56,12 +56,14 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
if($len <= 0){
|
||||
$this->offset = strlen($this->buffer) - 1;
|
||||
return "";
|
||||
}
|
||||
if($len === true){
|
||||
}elseif($len === true){
|
||||
return substr($this->buffer, $this->offset);
|
||||
}
|
||||
$this->offset += $len;
|
||||
return substr($this->buffer, $this->offset - $len, $len);
|
||||
$buffer = b"";
|
||||
for(; $len > 0; --$len, ++$this->offset){
|
||||
$buffer .= $this->buffer{$this->offset};
|
||||
}
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
protected function put($str){
|
||||
|
|
@ -168,4 +170,4 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
protected function feof(){
|
||||
return !isset($this->buffer{$this->offset});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue