Use getBool() more

This commit is contained in:
Dylan K. Taylor
2017-05-10 11:30:24 +01:00
parent c51c8ae700
commit 71af694cc1
3 changed files with 7 additions and 7 deletions

View File

@ -71,11 +71,11 @@ class BinaryStream extends \stdClass{
}
public function getBool() : bool{
return (bool) $this->getByte();
return $this->get(1) !== "\x00";
}
public function putBool($v){
$this->putByte((bool) $v);
$this->buffer .= ($v ? "\x01" : "\x00");
}
public function getLong(){