fix position handling

This commit is contained in:
Marcus Boerger 2002-10-03 16:06:41 +00:00
parent d661fa4b46
commit 3ee8172674

View File

@ -519,8 +519,10 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS
didread += toread;
}
if (size == 0)
if (size == 0) {
stream->position += didread;
return didread;
}
if (stream->flags & PHP_STREAM_FLAG_NO_BUFFER || stream->chunk_size == 1) {
if (stream->filterhead) {