diff options
Diffstat (limited to 'ext/intl/dateformat/dateformat_parse.c')
-rw-r--r-- | ext/intl/dateformat/dateformat_parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index 378ddf641a..2ba5e3089d 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -130,7 +130,7 @@ PHP_FUNCTION(datefmt_parse) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; - int32_t parse_pos = -1; + zend_long parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -147,8 +147,8 @@ PHP_FUNCTION(datefmt_parse) if (z_parse_pos) { ZVAL_DEREF(z_parse_pos); convert_to_long(z_parse_pos); - parse_pos = (int32_t)Z_LVAL_P(z_parse_pos); - if(parse_pos > text_len) { + parse_pos = Z_LVAL_P(z_parse_pos); + if((size_t)parse_pos > text_len) { RETURN_FALSE; } } @@ -169,7 +169,7 @@ PHP_FUNCTION(datefmt_localtime) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; - int32_t parse_pos = -1; + zend_long parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -186,8 +186,8 @@ PHP_FUNCTION(datefmt_localtime) if (z_parse_pos) { ZVAL_DEREF(z_parse_pos); convert_to_long(z_parse_pos); - parse_pos = (int32_t)Z_LVAL_P(z_parse_pos); - if(parse_pos > text_len) { + parse_pos = Z_LVAL_P(z_parse_pos); + if((size_t)parse_pos > text_len) { RETURN_FALSE; } } |