diff --git a/src/FontLib/BinaryStream.php b/src/FontLib/BinaryStream.php index cc5e72c..b6e91b6 100644 --- a/src/FontLib/BinaryStream.php +++ b/src/FontLib/BinaryStream.php @@ -158,7 +158,11 @@ public function write($data, $length = null) { } public function readUInt8() { - return ord($this->read(1)); + $byte = $this->read(1); + if ($byte === '') { + return 0; + } + return ord($byte); } public function readUInt8Many($count) {