]> granicus.if.org Git - php/commitdiff
isync with 5 branch
authorStanislav Malyshev <stas@php.net>
Fri, 10 Apr 2009 16:55:51 +0000 (16:55 +0000)
committerStanislav Malyshev <stas@php.net>
Fri, 10 Apr 2009 16:55:51 +0000 (16:55 +0000)
ext/intl/grapheme/grapheme_string.c

index 995495e05891e483d8c4a3de439c0e28ff21c915..9a53afa72e7daf742a5e7bd0f0d5b13f437a666e 100755 (executable)
@@ -542,7 +542,7 @@ PHP_FUNCTION(grapheme_substr)
                length += iter_val;
        }
        
-       if ( UBRK_DONE == sub_str_end_pos ) {
+       if ( UBRK_DONE == sub_str_end_pos && length < 0) {
        
                intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_substr: length not contained in string", 1 TSRMLS_CC );