diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-05-23 13:27:54 +0200 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-05-23 13:27:54 +0200 |
commit | 2eb069aa48c63a59aa8ed579eebe0e6e30b2833a (patch) | |
tree | 8560feaeb015d48e4a74932706c400398090c772 /ext/intl/collator | |
parent | e9a7039e60ea0ab621e1cd1c34e90caf33f6ea22 (diff) | |
parent | 8ee8ccda19cfe7c113b8cb9c488d53e50346840d (diff) | |
download | php-git-2eb069aa48c63a59aa8ed579eebe0e6e30b2833a.tar.gz |
Merge branch '5.4'
Diffstat (limited to 'ext/intl/collator')
-rwxr-xr-x | ext/intl/collator/collator_sort.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 76ee8186c9..04a24f013e 100755 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -595,6 +595,8 @@ PHP_FUNCTION( collator_get_sort_key ) RETURN_FALSE; } + /* ucol_getSortKey is exception in that the key length includes the + * NUL terminator*/ key_len = ucol_getSortKey(co->ucoll, ustr, ustr_len, key, 0); if(!key_len) { efree( ustr ); @@ -606,7 +608,7 @@ PHP_FUNCTION( collator_get_sort_key ) if(!key_len) { RETURN_FALSE; } - RETURN_STRINGL((char *)key, key_len, 0); + RETURN_STRINGL((char *)key, key_len - 1, 0); } /* }}} */ |