You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2018/09/06 12:04:10 UTC

svn commit: r1840213 - /spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm

Author: kmcgrail
Date: Thu Sep  6 12:04:10 2018
New Revision: 1840213

URL: http://svn.apache.org/viewvc?rev=1840213&view=rev
Log:
fix for Util wrap pre Perl 5.14 - bug 7616

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm?rev=1840213&r1=1840212&r2=1840213&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Util.pm Thu Sep  6 12:04:10 2018
@@ -643,15 +643,18 @@ sub wrap {
   my $pos = 0;
   my $pos_mod = 0;
   while ($#arr > $pos) {
-    my $len = length ($arr[$pos] =~ s/\t/        /g);
-
+    my $tmpline = $arr[$pos] ;
+    $tmpline =~ s/\t/        /g;
+    my $len = length ($tmpline);
     # if we don't want to have lines > $length (overflow==0), we
     # need to verify what will happen with the next line.  if we don't
     # care if a single line goes longer, don't care about the next
     # line.
     # we also want this to be true for the first entry on the line
     if ($pos_mod != 0 && $overflow == 0) {
-      $len += length ($arr[$pos+1] =~ s/\t/        /g);
+      my $tmpnext = $arr[$pos+1] ;
+      $tmpnext =~ s/\t/        /g;
+      $len += length ($tmpnext);
     }
 
     if ($len <= $length) {