Revert part of last change, that was causing utf8 test failures
Rafael Garcia-Suarez [Sun, 23 Jul 2006 13:17:48 +0000 (13:17 +0000)]
p4raw-id: //depot/perl@28608

toke.c

diff --git a/toke.c b/toke.c
index 2c6d8be..7bed30b 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -12422,7 +12422,7 @@ S_swallow_bom(pTHX_ U8 *s)
                filter_add(utf16rev_textfilter, NULL);
                Newx(news, (PL_bufend - (char*)s) * 3 / 2 + 1, U8);
                utf16_to_utf8_reversed(s, news,
-                                      PL_bufend - (char*)s,
+                                      PL_bufend - (char*)s - 1,
                                       &newlen);
                sv_setpvn(PL_linestr, (const char*)news, newlen);
 #ifdef PERL_MAD