--- embedaddon/php/main/streams/glob_wrapper.c 2012/02/21 23:48:05 1.1.1.1 +++ embedaddon/php/main/streams/glob_wrapper.c 2012/05/29 12:34:35 1.1.1.2 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: glob_wrapper.c,v 1.1.1.1 2012/02/21 23:48:05 misho Exp $ */ +/* $Id: glob_wrapper.c,v 1.1.1.2 2012/05/29 12:34:35 misho Exp $ */ #include "php.h" #include "php_streams_int.h" @@ -145,7 +145,7 @@ static size_t php_glob_stream_read(php_stream *stream, /* avoid problems if someone mis-uses the stream */ if (count == sizeof(php_stream_dirent) && pglob) { - if (pglob->index < pglob->glob.gl_pathc) { + if (pglob->index < (size_t)pglob->glob.gl_pathc) { php_glob_stream_path_split(pglob, pglob->glob.gl_pathv[pglob->index++], pglob->flags & GLOB_APPEND, &path TSRMLS_CC); PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); return sizeof(php_stream_dirent);