Changeset: 53bdd81ba929 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/53bdd81ba929
Modified Files:
        monetdb5/modules/mal/pcre.c
Branch: Jun2023
Log Message:

Fix regex bug


diffs (23 lines):

diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -470,7 +470,8 @@ re_create(const char *pat, bool caseigno
                                                goto bailout;
                                        *n = (struct RE) {.search = true, 
.atend = true, .w = wp + 1};
                                }
-                               *wq++ = 0;
+                               *wq = 0;
+                               wq = wp + 1;
                        } else {
                                *wq++ = *wp;
                                n->len++;
@@ -503,7 +504,8 @@ re_create(const char *pat, bool caseigno
                                                goto bailout;
                                        *n = (struct RE) {.search = true, 
.atend = true, .k = p + 1};
                                }
-                               *q++ = 0;
+                               *q = 0;
+                               q = p + 1;
                        } else {
                                *q++ = *p;
                                n->len++;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to