diff options
Diffstat (limited to 'main/streams/streams.c')
| -rw-r--r-- | main/streams/streams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 0f2aa7de71..d738970e07 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1282,7 +1282,7 @@ PHPAPI int _php_stream_seek(php_stream *stream, zend_off_t offset, int whence) } break; case SEEK_SET: - if (offset >= stream->position && + if (offset > stream->position && offset <= stream->position + stream->writepos - stream->readpos) { stream->readpos += offset - stream->position; stream->position = offset; |
