Skip to content

Commit

Permalink
is it right to add that lol
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaileke committed Aug 3, 2024
1 parent 9c11bb4 commit ba4c754
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/protocol/OpenConnectionReply1.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

namespace raklib\protocol;

use function is_int;

class OpenConnectionReply1 extends OfflineMessage{
public static $ID = MessageIdentifiers::ID_OPEN_CONNECTION_REPLY_1;

Expand All @@ -37,7 +39,7 @@ protected function encodePayload(PacketSerializer $out) : void{
$this->writeMagic($out);
$out->putLong($this->serverID);
$out->putByte($this->serverSecurity ? 1 : 0);
if ($this->serverSecurity) {
if ($this->serverSecurity && is_int($this->cookie)) {
$out->putInt($this->cookie);
}
$out->putShort($this->mtuSize);
Expand Down

0 comments on commit ba4c754

Please sign in to comment.