summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-07-28 12:23:18 +0000
committerAntony Dovgal <tony2001@php.net>2006-07-28 12:23:18 +0000
commita28a95c11a5d5103df539df4dc5a12cdb9405b03 (patch)
tree5b224efd3984bf515057d4b8d5ebe688eab52c52
parent4c2d752fb1629acdcda82e75956f6637091e3b71 (diff)
downloadphp-git-a28a95c11a5d5103df539df4dc5a12cdb9405b03.tar.gz
MFH: patch for #37846 (wordwrap() wraps incorrectly)
by Dmitry Kononov <ddk at krasn dot ru>
-rw-r--r--NEWS1
-rw-r--r--ext/standard/string.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index db286a189e..5f9c10d7b7 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ PHP NEWS
names). (Ilia)
- Fixed bug #38047 ("file" and "line" sometimes not set in backtrace from
inside error handler). (Dmitry)
+- Fixed bug #37846 (wordwrap() wraps incorrectly). (ddk at krasn dot ru, Tony)
- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
compatibility issue). (Jani, patch by scott dot moynes+php at gmail dot com)
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 2eacd3ead0..6ab8e008c0 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -669,7 +669,7 @@ PHP_FUNCTION(wordwrap)
lastspace = current;
} else if (current - laststart >= linelength && laststart != lastspace) {
newtext[lastspace] = breakchar[0];
- laststart = lastspace;
+ laststart = lastspace + 1;
}
}