Message-ID: <Pine.LNX.4.21.
0105091230110.1516-100000@marmot.rim.canoe.ca>
p4raw-id: //depot/perl@10054
while (count > 0)
{
SSize_t avail = PerlIO_get_cnt(f);
- SSize_t take = (count < avail) ? count : avail;
+ SSize_t take = 0;
+ if (avail > 0)
+ take = (count < avail) ? count : avail;
if (take > 0)
{
STDCHAR *ptr = PerlIO_get_ptr(f);