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