The CHECKOP macro was not invoked on some newly created ops
[p5sagit/p5-mst-13.2.git] / hv.c
diff --git a/hv.c b/hv.c
index ee08ce4..0bbebc6 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1705,11 +1705,11 @@ Perl_hv_clear(pTHX_ HV *hv)
 
     xhv = (XPVHV*)SvANY(hv);
 
-    if(SvREADONLY(hv)) {
+    if (SvREADONLY(hv)) {
        /* restricted hash: convert all keys to placeholders */
        I32 i;
        HE* entry;
-       for (i=0; i< (I32) xhv->xhv_max; i++) {
+       for (i = 0; i <= (I32) xhv->xhv_max; i++) {
            entry = ((HE**)xhv->xhv_array)[i];
            for (; entry; entry = HeNEXT(entry)) {
                /* not already placeholder */