From b28e19c004e0f1dc99a3191fa08505d40bff011e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Mar 2002 18:52:03 +0000 Subject: [PATCH] fix ftell/fseek in stdio streams --- main/streams.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/streams.c b/main/streams.c index ed465685fa..4dbea1c2c9 100755 --- a/main/streams.c +++ b/main/streams.c @@ -536,6 +536,9 @@ static int php_stdiop_seek(php_stream *stream, off_t offset, int whence) assert(data != NULL); + if (offset == 0 && whence == SEEK_CUR) + return ftell(data->file); + return fseek(data->file, offset, whence); } -- 2.50.1