mirror of
https://github.com/php/php-src.git
synced 2024-11-30 05:13:56 +08:00
- If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error
This commit is contained in:
parent
d31641e2d8
commit
56ec57c614
@ -1638,7 +1638,7 @@ PHPAPI int _php_stream_seek(php_stream *stream, off_t offset, int whence TSRMLS_
|
||||
case SEEK_CUR:
|
||||
if (offset == 0) {
|
||||
/* nothing to do */
|
||||
return 0;
|
||||
return stream->position >= 0 ? 0 : -1;
|
||||
}
|
||||
|
||||
if (offset > 0 && offset <= stream->readbuf_avail) {
|
||||
|
Loading…
Reference in New Issue
Block a user