From: Hugo van der Sanden Date: Wed, 19 Dec 2001 01:45:23 +0000 (+0000) Subject: Re: [ID 20011213.001] Segfault with overload and Test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e3013b16364a48eba51a8b57383bf45e1c4c0e4;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20011213.001] Segfault with overload and Test Message-Id: <200112190145.fBJ1jNt23668@crypt.compulink.co.uk> p4raw-id: //depot/perl@13786 --- diff --git a/sv.c b/sv.c index ff751cb..30ec7e4 100644 --- a/sv.c +++ b/sv.c @@ -3235,7 +3235,7 @@ Perl_sv_2bool(pTHX_ register SV *sv) if (SvROK(sv)) { SV* tmpsv; if (SvAMAGIC(sv) && (tmpsv=AMG_CALLun(sv,bool_)) && - (SvTYPE(tmpsv) != SVt_RV || (SvRV(tmpsv) != SvRV(sv)))) + (!SvROK(tmpsv) || (SvRV(tmpsv) != SvRV(sv)))) return SvTRUE(tmpsv); return SvRV(sv) != 0; }