]> granicus.if.org Git - php/commitdiff
fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251)
authorAntony Dovgal <tony2001@php.net>
Wed, 16 Jan 2008 08:34:06 +0000 (08:34 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 16 Jan 2008 08:34:06 +0000 (08:34 +0000)
patch by phprus at gmail dot com

ext/standard/string.c

index 1347a98e377e2c9581a9c97efa4d4a48368c4368..4c9277a20bc2a24e77fad20a663db0c9b825a9ca 100644 (file)
@@ -7821,7 +7821,7 @@ static int php_str_word_count(char *str, int str_len, long type, char *char_list
 
        while (p < e) {
                s = p;
-               while (p < e && (isalpha(*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) {
+               while (p < e && (isalpha((unsigned char)*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) {
                        p++;
                }
                if (p > s) {