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

index 7dc86b066fc685c06bd78e0bdf1fc027efa27b54..27a8399cd8e975fd204fb6b12b0005aa6bf3f113 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 */