Update the documentation of get_av() to note that it calls Perl_gv_fetchpv(),
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index d64965d..65419bd 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1,7 +1,7 @@
 /*    gv.c
  *
  *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- *    2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
+ *    2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -1863,12 +1863,13 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
       else if ( lex_mask && SvPOK(lex_mask) ) {
          /* we have an entry in the hints hash, check if method has been
           * masked by overloading.pm */
-         const int offset = method / 8;
-         const int bit    = method % 7;
          STRLEN len;
+         const int offset = method / 8;
+         const int bit    = method % 8;
          char *pv = SvPV(lex_mask, len);
 
-         if ( (STRLEN)offset <= len && pv[offset] & ( 1 << bit ) )
+         /* Bit set, so this overloading operator is disabled */
+         if ( (STRLEN)offset < len && pv[offset] & ( 1 << bit ) )
              return NULL;
       }
   }