Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/7263'
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Figlet/Figlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,9 @@ protected function _loadFont($fontFile)
$magic = $this->_readMagic($fp);

// Get the header
$line = fgets($fp, 1000) ?: '';
$numsRead = sscanf(
fgets($fp, 1000),
$line,
'%*c%c %d %*d %d %d %d %d %d',
$this->hardBlank,
$this->charHeight,
Expand Down Expand Up @@ -1057,7 +1058,13 @@ protected function _loadFont($fontFile)
// At the end fetch all extended characters
while (!feof($fp)) {
// Get the Unicode
list($uniCode) = explode(' ', fgets($fp, 2048));
$uniCode = fgets($fp, 2048);

if (false === $uniCode) {
continue;
}

list($uniCode) = explode(' ', $uniCode);

if (empty($uniCode)) {
continue;
Expand Down

0 comments on commit 1516e1f

Please sign in to comment.