diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-12-22 12:26:32 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-12-22 12:26:32 +0000 |
commit | ba7abf9d1538e18db741ea51e49e01e9ac1ea8a2 (patch) | |
tree | da5a98637c501f1be6c6b4ddef65274081624fda /perlio.c | |
parent | f2b27c0ebcd845b38b64790a1a1a6ac3dbdb148e (diff) | |
download | perl-ba7abf9d1538e18db741ea51e49e01e9ac1ea8a2.tar.gz |
Correct checking code which Ilya spotted was tripped by CR at EOF.
Also tone down perl -DP tracing of sv_gets.
p4raw-id: //depot/perlio@13847
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -3576,18 +3576,10 @@ PerlIOCrlf_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, SSize_t cnt) /* * Test code - delete when it works ... */ - STDCHAR *chk; - if (c->nl) - chk = c->nl + 1; - else { - chk = b->end; - if ((flags & PERLIO_F_CRLF) && chk > b->buf && chk[-1] == 0xd) - chk--; - } + STDCHAR *chk = (c->nl) ? (c->nl+1) : b->end; chk -= cnt; if (ptr != chk) { - dTHX; Perl_croak(aTHX_ "ptr wrong %p != %p fl=%08" UVxf " nl=%p e=%p for %d", ptr, chk, flags, c->nl, b->end, cnt); |