From 1041aa46da9fe177d33aae1f1bf4fc1a1eb79529 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 22 Apr 2013 04:22:16 -0400
Subject: [PATCH] Fix another text wrapping issue
---
program/lib/Roundcube/rcube_mime.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index 1e4fac8..96296a5 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -622,7 +622,7 @@
$subString = $substr_func($string, 0, $width, $charset);
// last line
- if ($subString === $string) {
+ if ($breakPos === false && $subString === $string) {
$cutLength = null;
}
else {
@@ -652,7 +652,7 @@
else if ($cut === false) {
$spacePos = $strpos_func($string, ' ', 0, $charset);
- if ($spacePos !== false) {
+ if ($spacePos !== false && $spacePos < $breakPos) {
$subString = $substr_func($string, 0, $spacePos, $charset);
$cutLength = $spacePos + 1;
}
--
Gitblit v1.9.1