summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 9b6b4e921c..da8f1d96b6 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -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++;
}