Re: cvs: php-src(PHP_5_3) /ext/intl/grapheme grapheme_string.c
| From: | Kalle Sommer Nielsen | Date: | Mon, 27 Apr 2009 18:53:10 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_3) /ext/intl/grapheme grapheme_string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-57323@lists.php.net to get a copy of this message | ||
Hi
2009/4/27 Kirti Velankar <kirtig@php.net>:
> kirtig Mon Apr 27 18:18:04 2009 UTC
>
> Modified files: (Branch: PHP_5_3)
> /php-src/ext/intl/grapheme grapheme_string.c
> Log:
> Fix in grapheme_extract
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/intl/grapheme/grapheme_string.c?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
> Index: php-src/ext/intl/grapheme/grapheme_string.c
> diff -u php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.3
> php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.4
> --- php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.3 Fri Apr 10 16:53:35 2009
> +++ php-src/ext/intl/grapheme/grapheme_string.c Mon Apr 27 18:18:04 2009
> @@ -852,10 +852,11 @@
> */
>
> if ( -1 != grapheme_ascii_check(pstr, size + 1 < str_len ? size + 1 : str_len ) )
> {
> + long nsize = ( size < str_len ? size : str_len );
> if ( NULL != next ) {
> - ZVAL_LONG(next, start+size);
> + ZVAL_LONG(next, start+nsize);
> }
> - RETURN_STRINGL(((char *)pstr), size, 1);
> + RETURN_STRINGL(((char *)pstr), nsize, 1);
> }
>
> /* convert the strings to UTF-16. */
>
Shouldn't this be in HEAD aswell?
>
>
--
Kalle Sommer Nielsen
kalle@php.net