Skip to content

Commit 5d430ad

Browse files
committed
fix bad cast
1 parent b157654 commit 5d430ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/standard/php_fopen_wrapper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ static int php_stream_input_flush(php_stream *stream TSRMLS_DC) /* {{{ */
120120

121121
static int php_stream_input_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC) /* {{{ */
122122
{
123-
php_stream *inner = stream->abstract;
123+
php_stream_input_t *input = stream->abstract;
124124

125-
if (inner) {
126-
int sought = php_stream_seek(inner, offset, whence);
127-
*newoffset = inner->position;
125+
if (*input->body_ptr) {
126+
int sought = php_stream_seek(*input->body_ptr, offset, whence);
127+
*newoffset = (*input->body_ptr)->position;
128128
return sought;
129129
}
130130

0 commit comments

Comments
 (0)