applied first part of suggested patch (bug described cannot be
Hugo van der Sanden [Sun, 28 Mar 1999 04:51:34 +0000 (05:51 +0100)]
reproduced any longer, so the second inconclusive part has not
been applied)
Message-Id: <199903280351.EAA20430@crypt.compulink.co.uk>
Subject: [PATCH 5.005_56] Re: A core dump

p4raw-id: //depot/perl@3308

toke.c

diff --git a/toke.c b/toke.c
index 4803bc8..b4a3d1d 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -928,10 +928,10 @@ scan_const(char *start)
     register char *d = SvPVX(sv);              /* destination for copies */
     bool dorange = FALSE;                      /* are we in a translit range? */
     I32 len;                                   /* ? */
-    I32 utf = PL_lex_inwhat == OP_TRANS
+    I32 utf = (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op)
        ? (PL_sublex_info.sub_op->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF))
        : UTF;
-    I32 thisutf = PL_lex_inwhat == OP_TRANS
+    I32 thisutf = (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op)
        ? (PL_sublex_info.sub_op->op_private & (PL_lex_repl ? OPpTRANS_FROM_UTF : OPpTRANS_TO_UTF))
        : UTF;