tday one bug in sam regexp code - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2f9d900118318c1a820b170cc04ddf58ed1eee87
 (DIR) parent 63408c39a1d07b210540e33a5fec030296cc5f49
 (HTM) Author: rsc <devnull@localhost>
       Date:   Sat,  9 Jun 2007 04:58:00 +0000
       
       day one bug in sam regexp code
       
       Diffstat:
         M src/cmd/acme/regx.c                 |       2 +-
         M src/cmd/sam/regexp.c                |       2 +-
         M src/libregexp/regexec.c             |       2 +-
       
       3 files changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/acme/regx.c b/src/cmd/acme/regx.c
       t@@ -668,7 +668,7 @@ rxexecute(Text *t, Rune *r, uint startp, uint eof, Rangeset *rp)
                                        /* evaluate right choice later */
                                        if(++ntl >= NLIST)
                                                goto Overflow;
       -                                addinst(tlp, inst->u.right, &tlp->se);
       +                                addinst(tl, inst->u.right, &tlp->se);
                                        /* efficiency: advance and re-evaluate */
                                        inst = inst->u1.left;
                                        goto Switchstmt;
 (DIR) diff --git a/src/cmd/sam/regexp.c b/src/cmd/sam/regexp.c
       t@@ -647,7 +647,7 @@ execute(File *f, Posn startp, Posn eof)
                                        /* evaluate right choice later */
                                        if(++ntl >= NLIST)
                                                goto Overflow;
       -                                addinst(tlp, inst->right, &tlp->se);
       +                                addinst(tl, inst->right, &tlp->se);
                                        /* efficiency: advance and re-evaluate */
                                        inst = inst->left;
                                        goto Switchstmt;
 (DIR) diff --git a/src/libregexp/regexec.c b/src/libregexp/regexec.c
       t@@ -132,7 +132,7 @@ regexec1(Reprog *progp,        /* program to run */
                                                break;
                                        case OR:
                                                /* evaluate right choice later */
       -                                        if(_renewthread(tlp, inst->u1.right, ms, &tlp->se) == tle)
       +                                        if(_renewthread(tl, inst->u1.right, ms, &tlp->se) == tle)
                                                        return -1;
                                                /* efficiency: advance and re-evaluate */
                                                continue;