summaryrefslogtreecommitdiff
path: root/main/streams/streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-xmain/streams/streams.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 81adff8137..294b3e41a6 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -918,9 +918,8 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re
just_read = (stream->writepos - stream->readpos) - len;
len += just_read;
- /* read operation have less data than request; assume the stream is
- * temporarily or permanently out of data */
- if (just_read < toread) {
+ /* Assume the stream is temporarily or permanently out of data */
+ if (just_read == 0) {
break;
}
}