From: Marcus Boerger Date: Tue, 28 Feb 2006 18:00:03 +0000 (+0000) Subject: - If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error X-Git-Tag: RELEASE_1_2~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56ec57c6149e74b472ec228ccd44f0eb7b77f983;p=php - If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error --- diff --git a/main/streams/streams.c b/main/streams/streams.c index 45df9f0c18..0124fc3715 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -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) {