Make offset accept negative values
git-svn-id: http://php-reader.googlecode.com/svn/trunk@6 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
@@ -144,7 +144,7 @@ class Reader
|
|||||||
*/
|
*/
|
||||||
public function setOffset($offset)
|
public function setOffset($offset)
|
||||||
{
|
{
|
||||||
fseek($this->_fd, $offset);
|
fseek($this->_fd, $offset < 0 ? $this->_size + $offset : $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user