Browse Source

Allow grow_mode && !bufstart (original assertion logic)

migration/RELEASE_1_0_0
Sara Golemon 20 years ago
parent
commit
201d5df650
  1. 7
      main/streams/streams.c

7
main/streams/streams.c

@ -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…
Cancel
Save