summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorLeon Timmermans <fawaka@gmail.com>2012-07-05 16:17:44 +0200
committerKarl Williamson <public@khwilliamson.com>2013-02-18 21:32:41 -0700
commitec1da995fb927cb6d590ede4756eae4e266d82b6 (patch)
tree9d5bdca5ece4d7b47ae9bd33a988035a069f7c08 /perlio.c
parent85e0be81e1d8f65b3262d44347a85ba9cb6bd76f (diff)
downloadperl-ec1da995fb927cb6d590ede4756eae4e266d82b6.tar.gz
PATCH [perl #112244]
:crlf currently doesn't fall back on :pending the way :perlio does when the unread data doesn't fit into its own buffer. Instead it just rejects them. This patch resolves that. Tests are coming in a future commit The committer added a cast to get it to compile on Win32, and silence a gcc warning on Linux
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 5de5e65cb3..097bc49664 100644
--- a/perlio.c
+++ b/perlio.c
@@ -4571,6 +4571,8 @@ PerlIOCrlf_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
}
}
}
+ if (count > 0)
+ unread += PerlIOBase_unread(aTHX_ f, (const STDCHAR *) vbuf + unread, count);
return unread;
}
}