Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c
[email protected] (Andrei Zmievski) Thu, 1 Jun 2000 08:55:25 -0500
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 01 Jun 2000, Jouni Ahto wrote:
> jah Thu Jun 1 06:38:23 2000 EDT
>
> Modified files:
> /php4/ext/standard string.c
> Log:
>
> (ucwords) Fixed fix for fix for fix for #4748.
> # Today's most fixed bug.
>
> r=return_value->value.str.val;
> *r=toupper((unsigned char)*r);
> - for(r_end = r + return_value->value.str.len -1 ; r < r_end ; r++ ) {
> + for(r_end = r + return_value->value.str.len -1 ; r < r_end ; ) {
> if(isspace(*r)) {
> - *++r=toupper((unsigned char)*r);
> + *r=toupper((unsigned char)*++r);
Are you sure about this? It seems that you're replacing space character
with the uppercased next one.
-Andrei
* Use the source, Luke. *