From 1fa930f22a3485f9bb86d555541c3ac82dc767b6 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 27 Jun 2012 12:41:56 -0700 Subject: [PATCH] pp.c: Restore uninit warning to study Also, prevent a crash when SvCUR is used on a non-PV. --- pp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp.c b/pp.c index c7d1841..1742baa 100644 --- a/pp.c +++ b/pp.c @@ -652,7 +652,7 @@ PP(pp_study) dVAR; dSP; dPOPss; STRLEN len; - len = SvCUR(sv); + (void)SvPV(sv, len); if (len == 0 || len > I32_MAX || !SvPOK(sv) || SvUTF8(sv) || SvVALID(sv)) { /* Historically, study was skipped in these cases. */ RETPUSHNO; -- 2.7.4