commit df02bc0
grunfink
·
2026-02-23 06:15:28 +0000 UTC
parent b90a117
Fixed possible crash in xs_regex_split_n().
1 files changed,
+1,
-1
+1,
-1
1@@ -58,7 +58,7 @@ xs_list *xs_regex_split_n(const char *str, const char *rx, int count)
2 }
3
4 /* add the rest of the string */
5- list = xs_list_append(list, p);
6+ list = xs_list_append(list, xs_is_string(p) ? p : "");
7
8 regfree(&re);
9