summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmain/streams/streams.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 90e77b710e..5591928470 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -867,7 +867,8 @@ static size_t _php_stream_write_buffer(php_stream *stream, const char *buf, size
justwrote = stream->ops->write(stream, buf, towrite TSRMLS_CC);
- if (justwrote > 0) {
+ /* convert justwrote to an integer, since normally it is unsigned */
+ if ((int)justwrote > 0) {
buf += justwrote;
count -= justwrote;
didwrite += justwrote;