We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfd8374 commit 9db72a0Copy full SHA for 9db72a0
lib/Sabberworm/CSS/Parser.php
@@ -490,7 +490,6 @@ private function peek($iLength = 1, $iOffset = 0) {
490
if ($iOffset >= $this->iLength) {
491
return '';
492
}
493
- $iLength = min($iLength, $this->iLength-$iOffset);
494
$out = $this->substr($iOffset, $iLength);
495
return $out;
496
@@ -585,7 +584,7 @@ private function inputLeft() {
585
584
586
private function substr($iStart, $iLength) {
587
$out = '';
588
- while ($iLength > 0) {
+ while ($iLength > 0 && $iStart < $this->iLength) {
589
$out .= $this->aText[$iStart];
590
$iStart++;
591
$iLength--;
0 commit comments