From: Nicholas Clark Date: Wed, 21 Oct 2009 14:19:12 +0000 (+0100) Subject: S_utf16_textfilter() needs FILTER_DATA() to get the filter's state SV. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89655c2e76bb18695d13f2accf9932e415907f92;p=p5sagit%2Fp5-mst-13.2.git S_utf16_textfilter() needs FILTER_DATA() to get the filter's state SV. aa6dbd607b0a3d8a wrongly assumed that the filter's state SV was the SV passed in as an argument to the filter read function. --- diff --git a/toke.c b/toke.c index 7ad492f..39b2e8a 100644 --- a/toke.c +++ b/toke.c @@ -12776,7 +12776,7 @@ S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen) dVAR; const STRLEN old = SvCUR(sv); const I32 count = FILTER_READ(idx+1, sv, maxlen); - const bool reverse = IoLINES(sv); + const bool reverse = IoLINES(FILTER_DATA(idx)); /* As we're automatically added, at the lowest level, and hence only called from this file, we can be sure that we're not called in block mode. Hence