diff options
author | Antony Dovgal <tony2001@php.net> | 2006-07-28 12:23:18 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-07-28 12:23:18 +0000 |
commit | a28a95c11a5d5103df539df4dc5a12cdb9405b03 (patch) | |
tree | 5b224efd3984bf515057d4b8d5ebe688eab52c52 | |
parent | 4c2d752fb1629acdcda82e75956f6637091e3b71 (diff) | |
download | php-git-a28a95c11a5d5103df539df4dc5a12cdb9405b03.tar.gz |
MFH: patch for #37846 (wordwrap() wraps incorrectly)
by Dmitry Kononov <ddk at krasn dot ru>
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/standard/string.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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; } } |