summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-11-07 12:52:09 -0700
committerKarl Williamson <khw@cpan.org>2017-11-07 13:07:07 -0700
commit47324b4ed3120b0540af346145c4af021b01dd12 (patch)
tree56f7ef75c434bb168090acda4a5e377147b6503b /gv.c
parentc1b0c18109cc81e4f80e604efc1fa81f82885265 (diff)
downloadperl-47324b4ed3120b0540af346145c4af021b01dd12.tar.gz
Blead breaks DBD::SQLite
This partially reverts 0f12654f40. The particular spot being reverted is in gv.c, and the change did not take into account all the nuances involved, so simply revert it. I believe what is happening is that a negative number is being generated and treated as a very large number. Instead the code should retain the original test that it was ok to do the subtraction, before actually doing it.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 4cef6d6ff3..bc5b388588 100644
--- a/gv.c
+++ b/gv.c
@@ -1073,9 +1073,8 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
DEBUG_o( Perl_deb(aTHX_ "Treating %s as %s::%s\n",
origname, HvENAME_get(stash), name) );
}
- else if (memBEGINs(last_separator - sizeof("::SUPER") - 1,
- sep_len, "::SUPER"))
- {
+ else if ( sep_len >= 7 &&
+ strBEGINs(last_separator - 7, "::SUPER")) {
/* don't autovifify if ->NoSuchStash::SUPER::method */
stash = gv_stashpvn(origname, sep_len - 7, is_utf8);
if (stash) flags |= GV_SUPER;