From 466bafcd4432239968dcf0c427d25b79b1833243 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sat, 5 Jan 2002 00:35:19 +0100 Subject: Bad \[...] prototype checking Message-ID: <20020104233519.A1850@rafael> p4raw-id: //depot/perl@14082 --- op.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'op.c') diff --git a/op.c b/op.c index 2cd4d7f671..d160fedf65 100644 --- a/op.c +++ b/op.c @@ -6787,9 +6787,16 @@ Perl_ck_subr(pTHX_ OP *o) goto again; break; case ']': - if (contextclass) - contextclass = 0; - else + if (contextclass) { + char *p = proto; + char s = *p; + contextclass = 0; + *p = '\0'; + while (*--p != '['); + bad_type(arg, Perl_form("one of %s", p), + gv_ename(namegv), o2); + *proto = s; + } else goto oops; break; case '*': -- cgit v1.2.1