summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-12 15:18:14 +0000
committerfukachan <fukachan>2001-02-12 15:18:14 +0000
commit3d767c19ca58c685fe0dfa68fc1bfa24b9a22092 (patch)
treeb62684df420a8ab4e44d77fcf1a86cfe7f840ff7
parentcc3c5801ca3b1ecaa57d75d9dcb070e7a6e4b176 (diff)
downloadfml8-3d767c19ca58c685fe0dfa68fc1bfa24b9a22092.tar.gz
fml8-3d767c19ca58c685fe0dfa68fc1bfa24b9a22092.tar.bz2
fml8-3d767c19ca58c685fe0dfa68fc1bfa24b9a22092.zip
_print_*():
check $len, exit if $len == 0 (which means $buf not contain even "\n") remove $pe which is not used.
-rw-r--r--fml/lib/MailingList/Messages.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/fml/lib/MailingList/Messages.pm b/fml/lib/MailingList/Messages.pm
index 1469972e..a67bb670 100644
--- a/fml/lib/MailingList/Messages.pm
+++ b/fml/lib/MailingList/Messages.pm
@@ -400,7 +400,7 @@ sub _print_messsage_on_memory
}
# 2. print content body: write each line in buffer
- my ($p, $len, $buf, $pbuf, $pe);
+ my ($p, $len, $buf, $pbuf);
SMTP_IO:
while (1) {
$p = index($$r_body, "\n", $pp);
@@ -408,9 +408,11 @@ sub _print_messsage_on_memory
$len = $p - $pp + 1;
$len = ($p < 0 ? ($maxlen - $pp) : $len);
- $pe = $pp + $len;
$buf = substr($$r_body, $pp, $len);
+ # do nothing, get away from here
+ last SMTP_IO if $len == 0;
+
unless (defined $raw_print_mode) {
# fix \n -> \r\n in the end of the line
if ($buf !~ /\r\n$/) { $buf =~ s/\n$/\r\n/;}