mirror of
https://github.com/php/php-src.git
synced 2024-12-02 06:13:40 +08:00
Allow grow_mode && !bufstart (original assertion logic)
This commit is contained in:
parent
89546335d2
commit
201d5df650
@ -1112,7 +1112,8 @@ PHPAPI void *_php_stream_get_line(php_stream *stream, int buf_type, zstr buf, si
|
||||
}
|
||||
|
||||
if (total_copied == 0) {
|
||||
assert(bufstart.v != NULL || !grow_mode || stream->eof);
|
||||
assert(stream->eof || !grow_mode ||
|
||||
(grow_mode && bufstart.v == NULL));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1122,10 +1123,6 @@ PHPAPI void *_php_stream_get_line(php_stream *stream, int buf_type, zstr buf, si
|
||||
buf.s[0] = 0;
|
||||
}
|
||||
|
||||
if (returned_len) {
|
||||
*returned_len = total_copied;
|
||||
}
|
||||
|
||||
return bufstart.s;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user