From 56ec57c6149e74b472ec228ccd44f0eb7b77f983 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 28 Feb 2006 18:00:03 +0000 Subject: [PATCH] - If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error --- main/streams/streams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.40.0