summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2026-02-23 07:15:28 +0100
committerGravatar grunfink2026-02-23 07:15:28 +0100
commitdf02bc02df1e9853c7af285cd726c800c0d9df25 (patch)
tree5164b64ecc06cc55e2ae8a8c56e347e1e7ea5aa5
parentMore JSON parser tweaks. (diff)
downloadsnac2-df02bc02df1e9853c7af285cd726c800c0d9df25.tar.gz
snac2-df02bc02df1e9853c7af285cd726c800c0d9df25.tar.xz
snac2-df02bc02df1e9853c7af285cd726c800c0d9df25.zip
Fixed possible crash in xs_regex_split_n().
-rw-r--r--xs_regex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_regex.h b/xs_regex.h
index 5ccefda..a2792c7 100644
--- a/xs_regex.h
+++ b/xs_regex.h
@@ -58,7 +58,7 @@ xs_list *xs_regex_split_n(const char *str, const char *rx, int count)
58 } 58 }
59 59
60 /* add the rest of the string */ 60 /* add the rest of the string */
61 list = xs_list_append(list, p); 61 list = xs_list_append(list, xs_is_string(p) ? p : "");
62 62
63 regfree(&re); 63 regfree(&re);
64 64