Skip to content

Commit cd48aac

Browse files
javiereguiluznicolas-grekas
authored andcommitted
Code updates
1 parent 0a2fff9 commit cd48aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CharacterStream.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function read(int $length): ?string
111111
$this->currentPos += $length;
112112
} else {
113113
$end = $this->currentPos + $length;
114-
$end = $end > $this->charCount ? $this->charCount : $end;
114+
$end = min($end, $this->charCount);
115115
$ret = '';
116116
$start = 0;
117117
if ($this->currentPos > 0) {

0 commit comments

Comments
 (0)