Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c
| From: | Andrei Zmievski | Date: | Thu, 01 Jun 2000 13:55:25 +0000 |
| Subject: | Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-16023@lists.php.net to get a copy of this message | ||
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. *