Re: [PHP4BETA] cvs: php4 /ext/standard/ string.c

[email protected] ("Faisal Nasim") Thu, 1 Jun 2000 15:48:19 +0100
Newsgroups php.version4
Message-ID <01bfcbd8$6d5dc6e0$4ad9a5ac@default>
|@@ -1155,7 +1155,8 @@
| *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++;
| }


You're incrementing 'r' in both conditions.

Put r++ before if() and remove the 'else' block.


Enjoy!

Faisal