summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_mime.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-03-18 19:51:32 +0100
committerAleksander Machniak <alec@alec.pl>2013-03-18 19:53:00 +0100
commitec27006ebeef24375dd59c2b952ce98ca8e40084 (patch)
tree01ec0dfcd7cc9ca209daf458f57aa517c1e2d1c8 /program/lib/Roundcube/rcube_mime.php
parent2c8afa8ac2cee63e6912c85112c7a4c463d80d18 (diff)
Fix wrapping of text lines with the same length as specified length limit
Diffstat (limited to 'program/lib/Roundcube/rcube_mime.php')
-rw-r--r--program/lib/Roundcube/rcube_mime.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index 2f24a1bb3..d21e3b4d5 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -595,11 +595,12 @@ class rcube_mime
while (count($list)) {
$line = array_shift($list);
$l = mb_strlen($line);
- $newlen = $len + $l + ($len ? 1 : 0);
+ $space = $len ? 1 : 0;
+ $newlen = $len + $l + $space;
if ($newlen <= $width) {
- $string .= ($len ? ' ' : '').$line;
- $len += (1 + $l);
+ $string .= ($space ? ' ' : '').$line;
+ $len += ($space + $l);
}
else {
if ($l > $width) {