]> granicus.if.org Git - php/commitdiff
Properly handly high ascii values in soundex().
authorIlia Alshanetsky <iliaa@php.net>
Thu, 17 Jun 2004 00:17:49 +0000 (00:17 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 17 Jun 2004 00:17:49 +0000 (00:17 +0000)
ext/standard/soundex.c

index 4e0ac58e1daf4b5238ed3b9a0877be7503e3e669..5341d8a35d0c05a5f67067d665e5c62972b11247 100644 (file)
@@ -74,7 +74,7 @@ PHP_FUNCTION(soundex)
                /* BUG: should also map here accented letters used in non */
                /* English words or names (also found in English text!): */
                /* esstsett, thorn, n-tilde, c-cedilla, s-caron, ... */
-               code = toupper(str[i]);
+               code = toupper((int)(unsigned char)str[i]);
                if (code >= 'A' && code <= 'Z') {
                        if (_small == 0) {
                                /* remember first valid char */