Re: [PATCH for _66] Makefile.SH problem on dos/djgpp
[p5sagit/p5-mst-13.2.git] / regcomp.c
index 73f504e..2b71d99 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -267,6 +267,10 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
            /* Allow dumping */
            n = scan + (*OPERAND(scan) + 2 - 1)/sizeof(regnode) + 2;
            while (n <= stop) {
+               /* Purify reports a benign UMR here sometimes, because we
+                * don't initialize the OP() slot of a node when that node
+                * is occupied by just the trailing null of the string in
+                * an EXACT node */
                if (regkind[(U8)OP(n)] != NOTHING || OP(n) == NOTHING) {
                    OP(n) = OPTIMIZED;
                    NEXT_OFF(n) = 0;
@@ -2569,8 +2573,8 @@ re_croak2(const char* pat1,const char* pat2,...)
        l2 = 510 - l1;
     Copy(pat1, buf, l1 , char);
     Copy(pat2, buf + l1, l2 , char);
-    buf[l1 + l2 + 1] = '\n';
-    buf[l1 + l2 + 2] = '\0';
+    buf[l1 + l2] = '\n';
+    buf[l1 + l2 + 1] = '\0';
     va_start(args, pat2);
     message = mess(buf, &args);
     va_end(args);