summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-12-08 22:56:08 +0000
committerNicholas Clark <nick@ccl4.org>2006-12-08 22:56:08 +0000
commitd372c83436cd3dfedd4d4b8b3f2affc2c1133af3 (patch)
tree31ea6a9d6194054f3a99da0180f456579e18832e /util.c
parentd3c72c2aff7252db1d3477802ef64270fef79eae (diff)
downloadperl-d372c83436cd3dfedd4d4b8b3f2affc2c1133af3.tar.gz
Perl_screaminstr() must be called with littlestr as a PVBM.
p4raw-id: //depot/perl@29489
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.c b/util.c
index 3ba64e0e8d..eefb5a5e87 100644
--- a/util.c
+++ b/util.c
@@ -754,6 +754,8 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
register const unsigned char *littleend;
I32 found = 0;
+ assert(SvTYPE(littlestr) == SVt_PVBM);
+
if (*old_posp == -1
? (pos = PL_screamfirst[BmRARE(littlestr)]) < 0
: (((pos = *old_posp), pos += PL_screamnext[pos]) == 0)) {