1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00

Allow grow_mode && !bufstart (original assertion logic)

This commit is contained in:
Sara Golemon
2006-03-21 18:28:42 +00:00
parent 89546335d2
commit 201d5df650

View File

@@ -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;
}