]> granicus.if.org Git - php/commitdiff
(ucwords) Yet another fix for #4748.
authorJouni Ahto <jah@php.net>
Thu, 1 Jun 2000 14:40:41 +0000 (14:40 +0000)
committerJouni Ahto <jah@php.net>
Thu, 1 Jun 2000 14:40:41 +0000 (14:40 +0000)
# Last one from me today, I must have a beer now.

ext/standard/string.c

index 9b6b4e921c02c5f07c105de51a28a1551c9b7b86..da8f1d96b6b0e52be921b93d4e583c2571e42601 100644 (file)
@@ -1155,7 +1155,8 @@ PHP_FUNCTION(ucwords)
        *r=toupper((unsigned char)*r);
        for(r_end = r + return_value->value.str.len - 1 ; r < r_end ; ) {
                if(isspace((int)*r)) {
-                       *r=toupper((unsigned char)*++r);
+                       r++;
+                       *r=toupper((unsigned char)*r);
                } else {
                        r++;
                }