Package: libtext-quoted-perl
Version: 2.09-1

Hi,

rt shows warnings like these in the log:

Negative repeat count does nothing at /usr/share/perl5/Text/Quoted.pm line 244.

Upstream bug is: https://rt.cpan.org/Public/Bug/Display.html?id=111986
- seems dead to me.

Attached patch silences the warning by ensuring the count is at least 
zero.

cheers,
Stefan
Description: Fix "Negative repeat count does nothing"

---
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=111986

--- libtext-quoted-perl-2.09.orig/lib/Text/Quoted.pm
+++ libtext-quoted-perl-2.09/lib/Text/Quoted.pm
@@ -241,6 +241,7 @@ sub _classify {
             else {
                 my $extraspace =
                   length( $line->{raw} ) - length( $line->{text} ) - $firstfrom;
+                $extraspace = 0 if $extraspace < 0;
                 $paras[-1]->{text} .= "\n" . q{ } x $extraspace . $line->{text};
                 $paras[-1]->{raw} .= "\n" . $line->{raw};
             }

Reply via email to