Skip Menu |

This queue is for tickets about the IO-Filter CPAN distribution.

Report information
The Basics
Id: 4385
Status: new
Priority: 0/
Queue: IO-Filter

People
Owner: Nobody in particular
Requestors: M.Miroslaw [...] elka.pw.edu.pl
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



Subject: BUG in IO::Filter->getline
while () condition in getline is testing boolean value of getc's return. When getc returns char '0' the condition is false and whole thing breaks. FIX: use 'defined' to test for getc returning error.
--- Filter.pm.old 2003-11-13 18:41:32.000000000 +0100 +++ Filter.pm 2003-11-13 18:43:12.000000000 +0100 @@ -83,7 +83,7 @@ use vars qw($VERSION $RELEASE); -$VERSION = '0.01'; +$VERSION = '0.02'; $RELEASE = 1; use Carp; @@ -216,7 +216,7 @@ my $line; my $c; - while ($c = $self->getc) + while (defined ($c = $self->getc)) { $line = "" unless defined $line; $line .= $c;