diff --git a/StringReader.php b/StringReader.php index 3fc1814..db05739 100644 --- a/StringReader.php +++ b/StringReader.php @@ -102,7 +102,7 @@ public function eatSpan($mask, $maxLength = null) $maxLength = $this->getRemainingByteCount(); } - return $this->read(strspn($this->data, $mask, $maxLength)); + return $this->read(strspn($this->data, $mask, $this->offset, $maxLength)); } /** @@ -117,7 +117,7 @@ public function eatCSpan($mask, $maxLength = null) $maxLength = $this->getRemainingByteCount(); } - return $this->read(strcspn($this->data, $mask, $maxLength)); + return $this->read(strcspn($this->data, $mask, $this->offset, $maxLength)); } public function getOffset()