Changeset: 03958827bff0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03958827bff0
Modified Files:
        monetdb5/modules/atoms/str.c
Branch: alloc-less-str
Log Message:

Don't forget null terminator


diffs (14 lines):

diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c
--- a/monetdb5/modules/atoms/str.c
+++ b/monetdb5/modules/atoms/str.c
@@ -4305,8 +4305,8 @@ str_substitute(str *buf, size_t *buflen,
                const char *pfnd;
 
                if (!lsrc || !l) { /* s/src is an empty string, there's nothing 
to substitute */
-                       if (l)
-                               CHECK_STR_BUFFER_LENGTH(buf, buflen, l, 
"str.substitute");
+                       l++;
+                       CHECK_STR_BUFFER_LENGTH(buf, buflen, l, 
"str.substitute");
                        strcpy(*buf, s);
                        return MAL_SUCCEED;
                }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to